This algorithm constructs the scaling basis functions and the wavelet basis functions along with the representations of the diffusion operator at these scales.
In the algorithm below, the subscript notation and represents the scaling basis functions at scale and the wavelet basis functions at scale respectively. The notation denotes the matrix representation of the scaling basis represented with respect to the basis . Lastly, the notation denotes the matrix represents of the operator , where the row space of is represented with respect to the basis , and the column space of is represented with respect to the basis . Otherwise put, the domain of operator is represented with respect to the basis and the range is represented with respect to the basis . The function is a sparse QR decomposition with precision.[2]
// Input:
// is the matrix representation of the diffusion operator.
// is the precision of the QR decomposition, e.g., 1e-6.
// is the maximum number of scale levels (note: this is an optional upper bound, it may converge sooner.)
// Output:
// is the set of scaling basis functions indexed by scale .
// is the set of wavelet basis functions indexed by scale .
: