/* Function bases defined by translation of mother functions. */ /* Last edited on 2007-04-17 07:41:12 by stolfi */ #ifndef basis_rep_H #define basis_rep_H /* Copyright © 2007 by the State University of Campinas (UNICAMP). */ /* See the copyright, authorship, and warranty notice at end of file. */ /* Last edited on 2007-04-16 17:30:29 by stolfi */ #include #include #include #include /* Created apr/2007 by Jorge Stolfi, UNICAMP */ typedef int64_t brep_grid_size_t; /* Size of a toroidal grid along an axis, in multiples of the corresponding grid step. */ basis_t *brep_make(basis_t *mom, brep_grid_size_t gsz, bool_t wrap); /* Creates a new basis {bas} whose elements are obtained by expanding and translating the elements of a one-dimensional basis {mom} over a regular one-dimensional grid. The domain interval {dom} is implicitly divided into {gsz} equal intervals (/cells/) of length {xstep}, starting at argument {xmin}. Let {nm = mom->size(mom)} be the number of elements in basis {mom}. The element of {bas} with index {ix} is {F((x - xmin)/xstep - k)}, where {k = ix/nm} and {F} is the element with index {ix % nm} of basis {mom}. If {wrap} is true, the domain {dom} is assumed to be circular, and the function {F} is wrapped-over and added to itself; the basis {bas} will then have {gsz*nm} elements. If {wrap} is false, the */ #endif