Class Cells<T extends Address>
- java.lang.Object
-
- org.jquantlib.math.matrixutilities.Cells<T>
-
- All Implemented Interfaces:
- java.lang.Cloneable
public abstract class Cells<T extends Address> extends java.lang.Object implements java.lang.CloneableThis class provides efficient basement for matrix operations by mapping matrices onto a linear array, which performs better than bidimensional arrays.In addition, access to elements is calculated by a certain policy which is intended to Matrix elements need to be translated to the underlying linear storage when they are read or written.
-
-
Field Summary
Fields Modifier and Type Field and Description double[]$Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Cellsclone()intcols()intcolumns()booleanempty()java.util.Set<Address.Flags>flags()voidrequireFlags(java.util.Set<Address.Flags> required, java.lang.String variable)introws()intsize()
-
-
-
Field Detail
-
$
@Deprecated public double[] $
Deprecated.This is the internal data storage where data is kept in an uni-dimensionaldouble[]The use of this field is highly discouraged by end-user applications.
Note: this field is deprecated in order to remind application developers avoid its use.
If you cannot avoid access to the underlying data, please remember that it can be non-contiguous, chained or mapped, which means that:
- you'd better obtain a reference to this internal data structure via method
Cells#data()instead;- you must be sure to use methods
Array._(int)andMatrix._(int, int)in order to guarantee you calculate properly addresses of elements in the underlying data structure.This internal data structure is exposed for convenience purposes only, given the fact that algorithms in general handle arrays or matrices directly. It's recommended that application code never calculate indexes directly, but employ Address mappings in order to perform this task.
In particular, when employing f2j in order to translate algorithms from FORTRAN into Java, the obtained code is 1-based indexed, like it is in FORTRAN, like this:
for (i = 1; i <= n; i++)rather than 0-based, like it is in Java, like this:for (i = 0; i < n; i++)For this reason, you'd better let JQuantLib manage indexing. The only thing you need to adjust is direct access to elements of arrays and matrices, converting things likea[i]toa.$[a._(i)]in case of arrays and things likem[i][j]tom.$[m._(i,j)]in case of matrices.- See Also:
Array._(int),Matrix._(int, int)
- you'd better obtain a reference to this internal data structure via method
-
-
Method Detail
-
rows
public final int rows()
-
columns
public final int columns()
-
cols
public final int cols()
-
size
public final int size()
-
empty
public final boolean empty()
-
flags
public final java.util.Set<Address.Flags> flags()
-
requireFlags
public void requireFlags(java.util.Set<Address.Flags> required, java.lang.String variable)
-
clone
public Cells clone()
- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG