Package edu.jas.ps
Class MultiVarPowerSeriesRing<C extends RingElem<C>>
java.lang.Object
edu.jas.ps.MultiVarPowerSeriesRing<C>
- Type Parameters:
C
- ring element type
- All Implemented Interfaces:
AbelianGroupFactory<MultiVarPowerSeries<C>>
,ElemFactory<MultiVarPowerSeries<C>>
,MonoidFactory<MultiVarPowerSeries<C>>
,RingFactory<MultiVarPowerSeries<C>>
,Serializable
public class MultiVarPowerSeriesRing<C extends RingElem<C>>
extends Object
implements RingFactory<MultiVarPowerSeries<C>>
Multivariate power series ring implementation. Uses lazy evaluated generating
function for coefficients.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal RingFactory
<C> Coefficient ring factory.static final int
Default truncate.final ExpVector
Zero ExpVector.final int
The number of variables.final MultiVarPowerSeries
<C> The constant power series 1 for this ring.protected static final Random
A default random sequence generator.(package private) int
Truncate.protected String[]
The names of the variables.final MultiVarPowerSeries
<C> The constant power series 0 for this ring. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
No argument constructor.Constructor.MultiVarPowerSeriesRing
(RingFactory<C> coFac, int nv) Constructor.MultiVarPowerSeriesRing
(RingFactory<C> coFac, int nv, int truncate) Constructor.MultiVarPowerSeriesRing
(RingFactory<C> cofac, int nv, int truncate, String[] names) Constructor.MultiVarPowerSeriesRing
(RingFactory<C> cofac, int nv, String[] names) Constructor.MultiVarPowerSeriesRing
(RingFactory<C> coFac, String[] names) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCharacteristic of this ring.copy
(MultiVarPowerSeries<C> c) Copy power series.boolean
Comparison with any other object.fixPoint
(MultiVarPowerSeriesMap<C> map) Fixed point construction.fromInteger
(long a) Get a (constant) MultiVarPowerSeries<C> from a long value.Get a (constant) MultiVarPowerSeries<C> from a java.math.BigInteger.Get a MultiVarPowerSeries<C> from a GenPolynomial<C>.fromPolynomial
(List<GenPolynomial<C>> A) Get a list of MultiVarPowerSeries<C> from a list of GenPolynomial<C>.fromPowerSeries
(UnivPowerSeries<C> ps, int r) Get a MultiVarPowerSeries<C> from a univariate power series.Generate a power series via lambda expression.Get a list of the generating elements.getCOS
(int r) Get the power series of the cosinus function.getEXP
(int r) Get the power series of the exponential function.getONE()
Get the one element.getSIN
(int r) Get the power series of the sinus function.getTAN
(int r) Get the power series of the tangens function.String[]
getVars()
Get the variable names.getZERO()
Get the zero element.int
hashCode()
Hash code for this .boolean
Query if this ring is associative.boolean
Query if this ring is commuative.boolean
isField()
Query if this ring is a field.boolean
isFinite()
Is this structure finite or infinite.Parse a power series.Parse a power series.polyRing()
Get the corresponding GenPolynomialRing<C>.random()
Generate a random power series with k = 5, d = 0.7.random
(int k) Generate a random power series with d = 0.7.random
(int k, float d) Generate a random power series.Generate a random power series.Generate a random power series with d = 0.7.seriesOfTaylor
(TaylorFunction<C> f, List<C> a) Taylor power series.int
setTruncate
(int t) Set truncate.solvePDE
(MultiVarPowerSeries<C> f, C c, int r) Solve an partial differential equation.toScript()
Get a scripting compatible string representation.toString()
To String.int
truncate()
Truncate.Get a String representation of the variable names.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.jas.structure.ElemFactory
valueOf
-
Field Details
-
random
A default random sequence generator. -
DEFAULT_TRUNCATE
public static final int DEFAULT_TRUNCATEDefault truncate.- See Also:
-
truncate
int truncateTruncate. -
EVZERO
Zero ExpVector. -
coFac
Coefficient ring factory. -
nvar
public final int nvarThe number of variables. -
vars
The names of the variables. This value can be modified. -
ONE
The constant power series 1 for this ring. -
ZERO
The constant power series 0 for this ring.
-
-
Constructor Details
-
MultiVarPowerSeriesRing
private MultiVarPowerSeriesRing()No argument constructor. -
MultiVarPowerSeriesRing
Constructor.- Parameters:
fac
- polynomial ring factory.
-
MultiVarPowerSeriesRing
Constructor.- Parameters:
coFac
- coefficient ring factory.
-
MultiVarPowerSeriesRing
Constructor.- Parameters:
coFac
- coefficient ring factory.truncate
- index of truncation.
-
MultiVarPowerSeriesRing
Constructor.- Parameters:
coFac
- coefficient ring factory.names
- of the variables.
-
MultiVarPowerSeriesRing
Constructor.- Parameters:
cofac
- coefficient ring factory.nv
- number of variables.names
- of the variables.
-
MultiVarPowerSeriesRing
Constructor.- Parameters:
cofac
- coefficient ring factory.truncate
- index of truncation.names
- of the variables.
-
-
Method Details
-
fixPoint
Fixed point construction.- Parameters:
map
- a mapping of power series.- Returns:
- fix point wrt map.
-
toString
To String. -
varsToString
Get a String representation of the variable names.- Returns:
- names separated by commas.
-
getVars
Get the variable names.- Returns:
- names.
-
toScript
Get a scripting compatible string representation.- Specified by:
toScript
in interfaceElemFactory<C extends RingElem<C>>
- Returns:
- script compatible representation for this ElemFactory.
- See Also:
-
equals
Comparison with any other object. -
hashCode
public int hashCode()Hash code for this . -
getZERO
Get the zero element.- Specified by:
getZERO
in interfaceAbelianGroupFactory<C extends RingElem<C>>
- Returns:
- 0 as MultiVarPowerSeries
.
-
getONE
Get the one element.- Specified by:
getONE
in interfaceMonoidFactory<C extends RingElem<C>>
- Returns:
- 1 as MultiVarPowerSeries
.
-
generators
Get a list of the generating elements.- Specified by:
generators
in interfaceElemFactory<C extends RingElem<C>>
- Returns:
- list of generators for the algebraic structure.
- See Also:
-
isFinite
public boolean isFinite()Is this structure finite or infinite.- Specified by:
isFinite
in interfaceElemFactory<C extends RingElem<C>>
- Returns:
- true if this structure is finite, else false.
- See Also:
-
truncate
public int truncate()Truncate.- Returns:
- truncate index of power series.
-
setTruncate
public int setTruncate(int t) Set truncate.- Parameters:
t
- new truncate index.- Returns:
- old truncate index of power series.
-
getEXP
Get the power series of the exponential function.- Parameters:
r
- variable for the direction.- Returns:
- exp(x_r) as MultiVarPowerSeries
.
-
getSIN
Get the power series of the sinus function.- Parameters:
r
- variable for the direction.- Returns:
- sin(x_r) as MultiVarPowerSeries
.
-
getCOS
Get the power series of the cosinus function.- Parameters:
r
- variable for the direction.- Returns:
- cos(x_r) as MultiVarPowerSeries
.
-
getTAN
Get the power series of the tangens function.- Parameters:
r
- variable for the direction.- Returns:
- tan(x_r) as MultiVarPowerSeries
.
-
solvePDE
Solve an partial differential equation. y_r' = f(y_r) with y_r(0) = c.- Parameters:
f
- a MultiVarPowerSeries. c
- integration constant.r
- variable for the direction.- Returns:
- f.integrate(c).
-
isCommutative
public boolean isCommutative()Query if this ring is commuative.- Specified by:
isCommutative
in interfaceMonoidFactory<C extends RingElem<C>>
- Returns:
- true, if this ring is commutative, else false.
-
isAssociative
public boolean isAssociative()Query if this ring is associative.- Specified by:
isAssociative
in interfaceMonoidFactory<C extends RingElem<C>>
- Returns:
- true if this ring is associative, else false.
-
isField
public boolean isField()Query if this ring is a field.- Specified by:
isField
in interfaceRingFactory<C extends RingElem<C>>
- Returns:
- true if this ring is a field, else false.
-
characteristic
Characteristic of this ring.- Specified by:
characteristic
in interfaceRingFactory<C extends RingElem<C>>
- Returns:
- characteristic of this ring.
-
fromInteger
Get a (constant) MultiVarPowerSeries<C> from a long value.- Specified by:
fromInteger
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
a
- long.- Returns:
- a MultiVarPowerSeries<C>.
-
fromInteger
Get a (constant) MultiVarPowerSeries<C> from a java.math.BigInteger.- Specified by:
fromInteger
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
a
- BigInteger.- Returns:
- a MultiVarPowerSeries<C>.
-
polyRing
Get the corresponding GenPolynomialRing<C>.- Returns:
- GenPolynomialRing<C>.
-
fromPolynomial
Get a MultiVarPowerSeries<C> from a GenPolynomial<C>.- Parameters:
a
- GenPolynomial<C>.- Returns:
- a MultiVarPowerSeries<C>.
-
fromPolynomial
Get a list of MultiVarPowerSeries<C> from a list of GenPolynomial<C>.- Parameters:
A
- list of GenPolynomial<C>.- Returns:
- a list of MultiVarPowerSeries<C>.
-
fromPowerSeries
Get a MultiVarPowerSeries<C> from a univariate power series.- Parameters:
ps
- UnivPowerSeries<C>.r
- variable for the direction.- Returns:
- a MultiVarPowerSeries<C>.
-
random
Generate a random power series with k = 5, d = 0.7.- Returns:
- a random power series.
-
random
Generate a random power series with d = 0.7.- Specified by:
random
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
k
- bit-size of random coefficients.- Returns:
- a random power series.
-
random
Generate a random power series with d = 0.7.- Specified by:
random
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
k
- bit-size of random coefficients.rnd
- is a source for random bits.- Returns:
- a random power series.
-
random
Generate a random power series.- Parameters:
k
- bit-size of random coefficients.d
- density of non-zero coefficients.- Returns:
- a random power series.
-
random
Generate a random power series.- Parameters:
k
- bit-size of random coefficients.d
- density of non-zero coefficients.rnd
- is a source for random bits.- Returns:
- a random power series.
-
generate
Generate a power series via lambda expression.- Parameters:
gener
- lambda expression.- Returns:
- a generated power series.
-
copy
Copy power series.- Specified by:
copy
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
c
- a power series.- Returns:
- a copy of c.
-
parse
Parse a power series. Note: not implemented.- Specified by:
parse
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
s
- String.- Returns:
- power series from s.
-
parse
Parse a power series. Note: not implemented.- Specified by:
parse
in interfaceElemFactory<C extends RingElem<C>>
- Parameters:
r
- Reader.- Returns:
- next power series from r.
-
seriesOfTaylor
Taylor power series.- Parameters:
f
- function.a
- expansion point.- Returns:
- Taylor series of f.
-