Liking cljdoc? Tell your friends :D

sicmutils.series


->functionclj/s

(->function s)

Accepts a Series or PowerSeries and coerces the input to a PowerSeries without any application. Returns the coerced PowerSeries instance.

Supplying a non-series will throw.

Accepts a `Series` or `PowerSeries` and coerces the input to a `PowerSeries`
without any application. Returns the coerced `PowerSeries` instance.

Supplying a non-series will throw.
sourceraw docstring

acos-seriesclj/s

source

acot-seriesclj/s

source

asin-seriesclj/s

source

asinh-seriesclj/s

source

atan-seriesclj/s

source

atanh-seriesclj/s

source

binomial-seriesclj/s

(binomial-series alpha)

Returns a PowerSeries instance representing a Binomial series, ie, the taylor series of the function $f$ given by

$$f(x) = (1 + x)^\alpha$$

Returns a `PowerSeries` instance representing a
[Binomial series](https://en.wikipedia.org/wiki/Binomial_series), ie, the
taylor series of the function $f$ given by

$$f(x) = (1 + x)^\alpha$$
sourceraw docstring

catalan-seriesclj/s

source

composeclj/s

(compose s t)

Returns a new PowerSeries $U$ that represents the composition of the two input power series $S$ and $T$, where $U$ evaluates like:

$$U(x) = S(T(x))$$

Returns a new `PowerSeries` $U$ that represents the composition of the two
input power series $S$ and $T$, where $U$ evaluates like:

$$U(x) = S(T(x))$$
sourceraw docstring

constantclj/s

(constant c)
(constant c kind)

Returns a PowerSeries representing the supplied constant term.

Optionally, pass kind of either ::series or ::power-series to specify the type of series returned.

Returns a `PowerSeries` representing the supplied constant term.

Optionally, pass `kind` of either `::series` or `::power-series` to specify
the type of series returned.
sourceraw docstring

cos-seriesclj/s

source

cosh-seriesclj/s

source

exp-seriesclj/s

source

fib-seriesclj/s

source

fmapclj/s

(fmap f s)

Returns a new series generated by applying the supplied f to each element in the input series s. The returned series will be the same type as the input series, either Series or PowerSeries.

NOTE scmutils calls this series:elementwise.

Returns a new series generated by applying the supplied `f` to each element in
the input series `s`. The returned series will be the same type as the input
series, either `Series` or `PowerSeries`.

NOTE scmutils calls this `series:elementwise`.
sourceraw docstring

generateclj/s

(generate f)
(generate f kind)

Returns a PowerSeries generated by (f i) for i in 0, 1, ...

Optionally, pass kind of either ::series or ::power-series to specify the type of series returned.

Returns a `PowerSeries` generated by (f i) for i in 0, 1, ...

Optionally, pass `kind` of either `::series` or `::power-series` to specify
the type of series returned.
sourceraw docstring

identityclj/s

source

inflateclj/s

(inflate s n)

Accepts an input series s and an exponent n, and expands the series in the nth power of its argument. Every term i maps to position i*n, with zeros padded in the new missing slots.

For example:

(inflate identity 3) ;; => (series 0 0 0 1)

(take 6 (inflate (generate inc) 3)) ;; => (1 0 2 0 3 0)

NOTE this operation makes sense as described for a PowerSeries, where each entry represents the coefficient of some power of x; functionally it still works with Series objects.

Accepts an input series `s` and an exponent `n`, and expands the series in the
`n`th power of its argument. Every term `i` maps to position `i*n`, with zeros
padded in the new missing slots.

For example:

(inflate identity 3)
;; => (series 0 0 0 1)

(take 6 (inflate (generate inc) 3))
;; => (1 0 2 0 3 0)

NOTE this operation makes sense as described for a `PowerSeries`, where each
entry represents the coefficient of some power of `x`; functionally it still
works with `Series` objects.
sourceraw docstring

integralclj/s

(integral s)
(integral s constant)

Returns a PowerSeries $U$ that represents the definite integral of the input power series $S$ with constant term $c$:

$$U = c + \int_0^{\infty} S$$

Returns a `PowerSeries` $U$ that represents the definite integral of the input
power series $S$ with constant term $c$:

$$U = c + \int_0^{\infty} S$$
sourceraw docstring

log1+x-seriesclj/s

source

log1-x-seriesclj/s

source

oneclj/s

source

partial-sumsclj/s

(partial-sums s)

Returns a series (of the same type as the input) of partial sums of the terms in the supplied series s.

Returns a series (of the same type as the input) of partial sums of the terms
in the supplied series `s`.
sourceraw docstring

power-seriesclj/s

(power-series & prefix)

Return a PowerSeries starting with the supplied values. The remainder of the series will be filled with the zero-value corresponding to the first of the given values.

If you have a sequence already, prefer power-series*

Return a `PowerSeries` starting with the supplied values. The remainder of the
series will be filled with the zero-value corresponding to the first of the
given values.

If you have a sequence already, prefer `power-series*`
sourceraw docstring

power-series*clj/s

(power-series* prefix)

Given a sequence, returns a new PowerSeries object that wraps that sequence (potentially padding its tail with zeros if it's finite).

Given a sequence, returns a new `PowerSeries` object that wraps that
sequence (potentially padding its tail with zeros if it's finite).
sourceraw docstring

power-series?clj/s

(power-series? s)

Returns true if s is specifically a PowerSeries, false otherwise.

Returns true if `s` is specifically a `PowerSeries`, false otherwise.
sourceraw docstring

PowerSeriescljs

source

revertclj/s

(revert s)

Returns a new PowerSeries $U$ that represents the compositional inverse (the 'reversion') of the input power series $S$, satisfying:

$$S(U(x)) = x$$

Returns a new `PowerSeries` $U$ that represents the compositional inverse (the
'reversion') of the input power series $S$, satisfying:

$$S(U(x)) = x$$
sourceraw docstring

sec-seriesclj/s

source

seriesclj/s

(series & prefix)

Return a Series starting with the supplied values. The remainder of the series will be filled with the zero-value corresponding to the first of the given values.

If you have a sequence already, prefer series*

Return a `Series` starting with the supplied values. The remainder of the
series will be filled with the zero-value corresponding to the first of the
given values.

If you have a sequence already, prefer `series*`
sourceraw docstring

Seriescljs

source

series*clj/s

(series* prefix)

Given a sequence, returns a new Series object that wraps that sequence (potentially padding its tail with zeros if it's finite).

Given a sequence, returns a new `Series` object that wraps that
sequence (potentially padding its tail with zeros if it's finite).
sourceraw docstring

series?clj/s

(series? s)

Returns true if s is either a Series or a PowerSeries, false otherwise.

Returns true if `s` is either a `Series` or a `PowerSeries`, false otherwise.
sourceraw docstring

sin-seriesclj/s

source

sinh-seriesclj/s

source

sumclj/s

(sum s n)

Returns the sum of all elements in the input series s up to order n (inclusive). For example:

(sum (series 1 1 1 1 1 1 1) 3) ;; => 4

NOTE that sum sums the first n + 1 terms, since series starts with an order 0 term.

Returns the sum of all elements in the input series `s` up to order
`n` (inclusive). For example:

(sum (series 1 1 1 1 1 1 1) 3)
;; => 4

NOTE that `sum` sums the first `n + 1` terms, since series starts with an
order 0 term.
sourceraw docstring

tan-seriesclj/s

source

tanh-seriesclj/s

source

valueclj/s

(value s xs)

Returns the value of the supplied Series or PowerSeries applied to xs.

If a PowerSeries is supplied, xs (despite its name) must be a single value. Returns a Series generated by multiplying each ith term in s by $x^i$, where $x$ is the xs argument.

If a Series is supplied:

Assumes that S is a series of applicables of arity equal to the count of xs. If, in fact, S is a series of series-valued applicables, then the result will be a sort of layered sum of the values.

Concretely, suppose that S has the form:

[x => [A1 A2 A3...], x => [B1 B2 B3...], x => [C1 C2 C3...], ...]

Then, this series applied to x will yield the new series:

[A1 (+ A2 B1) (+ A3 B2 C1) ...]

The way to think about this is, that if a power series has some other series as the coefficient of the $x^n$ term, the series must shift by $n$ positions before being added into the final total.

Returns the value of the supplied `Series` or `PowerSeries` applied to `xs`.

If a `PowerSeries` is supplied, `xs` (despite its name) must be a single
value. Returns a `Series` generated by multiplying each `i`th term in `s` by
$x^i$, where $x$ is the `xs` argument.

If a `Series` is supplied:

Assumes that S is a series of applicables of arity equal to the count of `xs`.
If, in fact, S is a series of series-valued applicables, then the result will
be a sort of layered sum of the values.

Concretely, suppose that S has the form:

  [x => [A1 A2 A3...], x => [B1 B2 B3...], x => [C1 C2 C3...], ...]

Then, this series applied to x will yield the new series:

  [A1 (+ A2 B1) (+ A3 B2 C1) ...]

The way to think about this is, that if a power series has some other series
as the coefficient of the $x^n$ term, the series must shift by $n$ positions
before being added into the final total.
sourceraw docstring

xpowclj/s

(xpow n)

Returns a PowerSeries instance representing $x^n$.

Returns a `PowerSeries` instance representing $x^n$.
sourceraw docstring

zeroclj/s

source

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

× close