(divide u v)
Divide polynomial u by v, and return the pair of [quotient, remainder] polynomials. This assumes that the coefficients are drawn from a field, and so support division.
Divide polynomial u by v, and return the pair of [quotient, remainder] polynomials. This assumes that the coefficients are drawn from a field, and so support division.
(evaluate p xs)
Evaluates a multivariate polynomial p at xs.
Evaluates a multivariate polynomial p at xs.
(evenly-divide u v)
Divides the polynomial u by the polynomial v. Throws an IllegalStateException if the division leaves a remainder. Otherwise returns the quotient.
Divides the polynomial u by the polynomial v. Throws an IllegalStateException if the division leaves a remainder. Otherwise returns the quotient.
(expt p n)
Raise the polynomial p to the (integer) power n.
Raise the polynomial p to the (integer) power n.
(lex-order xs ys)
Lex order for monomials considers the power of x, then the power of y, etc.
Lex order for monomials considers the power of x, then the power of y, etc.
(lower-arity p)
Given a nonzero polynomial of arity A > 1, return an equivalent polynomial of arity 1 whose coefficients are polynomials of arity A-1.
Given a nonzero polynomial of arity A > 1, return an equivalent polynomial of arity 1 whose coefficients are polynomials of arity A-1.
(make dense-coefficients)
(make arity xc-pairs)
When called with two arguments, the first is the arity (number of indeterminates) of the polynomial followed by a sequence of exponent-coefficient pairs. Each exponent should be a vector with length equal to the arity, with integer exponent values. To make 4 x^2 y + 5 x y^2, an arity 2 polynomial (since it has two variables, x and y), we could write the following for xc-pairs: [[[2 1] 4] [[1 2] 5]]
When called with one argument, the sequence is interpreted as a dense sequence of coefficients of an arity-1 (univariate) polynomial. The coefficients begin with the constant term and proceed to each higher power of the indeterminate. For example, x^2
When called with two arguments, the first is the arity (number of indeterminates) of the polynomial followed by a sequence of exponent-coefficient pairs. Each exponent should be a vector with length equal to the arity, with integer exponent values. To make 4 x^2 y + 5 x y^2, an arity 2 polynomial (since it has two variables, x and y), we could write the following for xc-pairs: [[[2 1] 4] [[1 2] 5]] When called with one argument, the sequence is interpreted as a dense sequence of coefficients of an arity-1 (univariate) polynomial. The coefficients begin with the constant term and proceed to each higher power of the indeterminate. For example, x^2 - 1 can be constructed by (make [-1 0 1]).
(make-constant arity c)
Return a constant polynomial of the given arity.
Return a constant polynomial of the given arity.
(map-coefficients f p)
Map the function f over the coefficients of p, returning a new Polynomial.
Map the function f over the coefficients of p, returning a new Polynomial.
(map-exponents f p)
Map the function f over the exponents of each monomial in p, returning a new Polynomial.
Map the function f over the exponents of each monomial in p, returning a new Polynomial.
(mul p q)
Multiply polynomials p and q, and return the product.
Multiply polynomials p and q, and return the product.
(partial-derivative p i)
The partial derivative of the polynomial with respect to the i-th indeterminate.
The partial derivative of the polynomial with respect to the i-th indeterminate.
(partial-derivatives p)
The sequence of partial derivatives of p with respect to each indeterminate
The sequence of partial derivatives of p with respect to each indeterminate
(polynomial? p)
Returns true if the supplied argument is an instance of Polynomial, false otherwise.
Returns true if the supplied argument is an instance of Polynomial, false otherwise.
(pseudo-remainder u v)
Compute the pseudo-remainder of univariate polynomials p and q. Fractions won't appear in the result; instead the divisor is multiplied by the leading coefficient of the dividend before quotient terms are generated so that division will not result in fractions. Only the remainder is returned, together with the integerizing factor needed to make this happen. Similar in spirit to Knuth's algorithm 4.6.1R, except we don't multiply the remainder through during gaps in the remainder. Since you don't know up front how many times the integerizing multiplication will be done, we also return the number d for which d * u = q * v + r.
Compute the pseudo-remainder of univariate polynomials p and q. Fractions won't appear in the result; instead the divisor is multiplied by the leading coefficient of the dividend before quotient terms are generated so that division will not result in fractions. Only the remainder is returned, together with the integerizing factor needed to make this happen. Similar in spirit to Knuth's algorithm 4.6.1R, except we don't multiply the remainder through during gaps in the remainder. Since you don't know up front how many times the integerizing multiplication will be done, we also return the number d for which d * u = q * v + r.
(raise-arity p)
The opposite of lower-arity.
The opposite of lower-arity.
(sub p q)
Subtract the polynomial q from the polynomial p.
Subtract the polynomial q from the polynomial p.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close