public class RealFunctionPeriodicOnIntegers extends Object implements RealFunction.PeriodicOnIntegers
IntegerFunction.PeriodicOnIntegers
. Function values are stored
internally, so using this class to make a copy of a
RealFunction.PeriodicOnIntegers c
(by the corresponding
constructor or the assign method) will make a snapshot of the current state
of c
. No reference to c
itself is retained.Constructor and Description |
---|
RealFunctionPeriodicOnIntegers() |
RealFunctionPeriodicOnIntegers(int n)
Creates a periodic sequence of period
n with all values
equal to zero. |
RealFunctionPeriodicOnIntegers(RealFunction.PeriodicOnIntegers c)
Creates a copy of
c . |
Modifier and Type | Method and Description |
---|---|
void |
assign(RealFunction.OnIndex c)
Become the periodic extension of
c . |
void |
assign(RealFunction.PeriodicOnIntegers c)
Become a copy of
c . |
void |
assignZero()
Keep the period but set all values to zero.
|
void |
assignZero(int n)
Become a periodic sequence of period
n with all values
equal to zero. |
int |
getPeriod()
Returns the period of this function (a positive integer),
refering to the behaviour in the last coordinate.
|
void |
setPeriod(int n)
Do nothing if
n is equal to the current period, become
a periodic sequence with period code>n and all values zero
otherwise. |
void |
setValueAt(int j,
double x) |
double |
valueAt(int j)
returns the value of this function at
j . |
public RealFunctionPeriodicOnIntegers()
public RealFunctionPeriodicOnIntegers(int n)
n
with all values
equal to zero.public RealFunctionPeriodicOnIntegers(RealFunction.PeriodicOnIntegers c)
c
.public void assign(RealFunction.OnIndex c)
c
.public void assign(RealFunction.PeriodicOnIntegers c)
c
.public void assignZero()
public void assignZero(int n)
n
with all values
equal to zero.public int getPeriod()
public void setPeriod(int n)
n
is equal to the current period, become
a periodic sequence with period code>n and all values zero
otherwise.n
- must be at least one.public void setValueAt(int j, double x)
public double valueAt(int j)
j
.