Liking cljdoc? Tell your friends :D

sicmutils.polynomial


absclj/s

(abs p)

addclj/s

(add p q)

Adds the polynomials p and q

Adds the polynomials p and q
raw docstring

check-same-arityclj/s

(check-same-arity p q)

coefficientclj/s


coefficientsclj/s

(coefficients p)

degreeclj/s

(degree p)

divideclj/s

(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.
raw docstring

evaluateclj/s

(evaluate p xs)

Evaluates a multivariate polynomial p at xs.

Evaluates a multivariate polynomial p at xs.
raw docstring

evenly-divideclj/s

(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.
raw docstring

exponentsclj/s


exptclj/s

(expt p n)

Raise the polynomial p to the (integer) power n.

Raise the polynomial p to the (integer) power n.
raw docstring

graded-lex-orderclj/s

(graded-lex-order xs ys)

graded-reverse-lex-orderclj/s

(graded-reverse-lex-order xs ys)

lex-orderclj/s

(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.
raw docstring

lower-arityclj/s

(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.
raw docstring

makeclj/s

(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

  • 1 can be constructed by (make [-1 0 1]).
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]).
raw docstring

make-constantclj/s

(make-constant arity c)

Return a constant polynomial of the given arity.

Return a constant polynomial of the given arity.
raw docstring

map-coefficientsclj/s

(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.
raw docstring

map-exponentsclj/s

(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.
raw docstring

monomial?clj/s

(monomial? p)

mulclj/s

(mul p q)

Multiply polynomials p and q, and return the product.

Multiply polynomials p and q, and return the product.
raw docstring

negateclj/s


partial-derivativeclj/s

(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.
raw docstring

partial-derivativesclj/s

(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
raw docstring

polynomial?clj/s

(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.
raw docstring

pseudo-remainderclj/s

(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.
raw docstring

raise-arityclj/s

(raise-arity p)

The opposite of lower-arity.

The opposite of lower-arity.
raw docstring

subclj/s

(sub p q)

Subtract the polynomial q from the polynomial p.

Subtract the polynomial q from the polynomial p.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close