
useDynLib("basefun", .registration = TRUE)

import("variables")
import("Matrix")#, rBind, Diagonal, bdiag, sparse.model.matrix)
import("polynom")
importFrom("orthopolynom", "legendre.polynomials")
importFrom("methods", "as")
importFrom("stats", ".checkMFClasses", ".getXlevels", "as.formula",
           "contr.treatment", "dbeta", "model.frame", "pbeta",
           "variable.names", "model.matrix", "predict", "D")

export(Bernstein_basis, as.basis, b, 
       log_basis, polynomial_basis, Legendre_basis, intercept_basis,
       cyclic_basis)

S3method("as.basis", "formula")
S3method("as.basis", "factor_var")
S3method("as.basis", "ordered_var")
S3method("as.basis", "factor")
S3method("as.basis", "ordered")
S3method("mkgrid", "basis")
S3method("mkgrid", "bases")
S3method("mkgrid", "intercept_basis")
S3method("c", "basis")
S3method("c", "bases")
S3method("as.vars", "basis")
S3method("as.vars", "bases")
S3method("nparm", "basis")
S3method("nparm", "intercept_basis")
S3method("nparm", "box_bases")
S3method("nparm", "cbind_bases")
S3method("model.matrix", "Bernstein_basis")
S3method("model.matrix", "box_bases")
S3method("model.matrix", "cbind_bases")
S3method("model.matrix", "formula_basis")
S3method("model.matrix", "log_basis")
S3method("model.matrix", "polynomial_basis")
S3method("model.matrix", "intercept_basis")
S3method("model.matrix", "cyclic_basis")
S3method("predict", "basis")
S3method("predict", "box_bases")
S3method("predict", "cbind_bases")
S3method("variable.names", "bases")
S3method("variable.names", "basis")
S3method("intercept", "default")
S3method("intercept", "box_bases")
S3method("intercept", "cbind_bases")
S3method("bounds", "basis")
S3method("bounds", "bases")
