public class RealFunctionPeriodicOnIndexCrossIntegers extends Object implements RealFunction.PeriodicOnIndexCrossIntegers
RealFunction.PeriodicOnIndexCrossIntegers
.
Function values are stored internally, so using this class to make a copy of
a RealFunction.PeriodicOnIndexCrossIntegers 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 |
---|
RealFunctionPeriodicOnIndexCrossIntegers()
Creates a grid with 1 row and no columns.
|
RealFunctionPeriodicOnIndexCrossIntegers(int m,
int n)
Creates a grid with
m rows, period n
and all values zero. |
RealFunctionPeriodicOnIndexCrossIntegers(RealFunction.PeriodicOnIndexCrossIntegers c)
Creates a copy of the function
c |
Modifier and Type | Method and Description |
---|---|
void |
assign(RealFunction.OnIndexCrossIndex c)
Become a copy of the periodic extension of
c |
void |
assign(RealFunction.PeriodicOnIndexCrossIntegers c)
Become a copy of
c |
void |
assignZero()
Keep the number of rows and the period but set all values to zero.
|
void |
assignZero(int m,
int n)
Become a matrix with
m periodic rows of period
n and all values zero. |
int |
getNumRows()
Returns the number of rows (the range of the first variable of
this function).
|
int |
getPeriod()
Returns the period of this function (a positive integer),
refering to the behaviour in the last coordinate.
|
void |
setSize(int m,
int n)
Do nothing if
m is equal to the current number of rows and
n is equal to the current period, become
a matrix with m periodic rows of period code>n
and all values zero otherwise. |
void |
setValueAt(int i,
int j,
double z)
Sets the value at index
i,j to z . |
double |
valueAt(int i,
int j)
returns the value of this function at
i,j . |
public RealFunctionPeriodicOnIndexCrossIntegers()
public RealFunctionPeriodicOnIndexCrossIntegers(int m, int n)
m
rows, period n
and all values zero.public RealFunctionPeriodicOnIndexCrossIntegers(RealFunction.PeriodicOnIndexCrossIntegers c)
c
public void assign(RealFunction.OnIndexCrossIndex c)
c
public void assign(RealFunction.PeriodicOnIndexCrossIntegers c)
c
public void assignZero()
public void assignZero(int m, int n)
m
periodic rows of period
n
and all values zero.m
- must be at least one.n
- must be at least one.public int getNumRows()
public int getPeriod()
public void setSize(int m, int n)
m
is equal to the current number of rows and
n
is equal to the current period, become
a matrix with m
periodic rows of period code>n
and all values zero otherwise.m
- must be at least one.n
- must be at least one.public void setValueAt(int i, int j, double z)
i,j
to z
.i
- must be non-negative and less than getNumRows()
.public double valueAt(int i, int j)
i,j
.