Documentation API of the 'cern.colt.matrix.linalg.Property' Java class
Property
cern.colt.matrix.linalg

Class Property

  • All Implemented Interfaces:
    Serializable, Cloneable


    public class Propertyextends PersistentObject
    Tests matrices for linear algebraic properties (equality, tridiagonality, symmetry, singularity, etc).

    Except where explicitly indicated, all methods involving equality tests (==) allow for numerical instability, to a degree specified upon instance construction and returned by method tolerance().The public static final variable DEFAULT represents a default Property object with a tolerance of 1.0E-9.The public static final variable ZERO represents a Property object with a tolerance of 0.0.The public static final variable TWELVE represents a Property object with a tolerance of 1.0E-12.As long as you are happy with these tolerances, there is no need to construct Property objects.Simply use idioms like Property.DEFAULT.equals(A,B), Property.ZERO.equals(A,B), Property.TWELVE.equals(A,B).

    To work with a different tolerance (e.g. 1.0E-15 or 1.0E-5) use the constructor and/or method setTolerance(double).Note that the public static final Property objects are immutable: Is is not possible to alter their tolerance. Any attempt to do so will throw an Exception.

    Note that this implementation is not synchronized.

    Example: equals(DoubleMatrix2D A, DoubleMatrix2D B) is defined as follows

    { some other tests not related to tolerance go here }double epsilon = tolerance();for (int row=rows; --row >= 0;) {   for (int column=columns; --column >= 0;) {      //if (!(A.getQuick(row,column) == B.getQuick(row,column))) return false;      if (Math.abs(A.getQuick(row,column) - B.getQuick(row,column)) > epsilon) return false;   }}return true;
    Here are some example properties
    matrix 4 x 4 
    0 0 0 0
    0 0 0 0
    0 0 0 0
    0 0 0 0
    4 x 4
    1 0 0 0
    0 0 0 0
    0 0 0 0
    0 0 0 1
    4 x 4
    1 1 0 0
    1 1 1 0
    0 1 1 1
    0 0 1 1
    4 x 4
    0 1 1 1
    0 1 1 1
    0 0 0 1
    0 0 0 1
    4 x 4
    0 0 0 0
    1 1 0 0
    1 1 0 0
    1 1 1 1
    4 x 4
    1 1 0 0
    0 1 1 0
    0 1 0 1
    1 0 1 1
    4 x 4
    1 1 1 0
    0 1 0 0
    1 1 0 1
    0 0 1 1
    upperBandwidth
    0
    0
    1
    3 0
    1
    2
    lowerBandwidth
    0
    0
    1
    0 3
    3
    2
    semiBandwidth
    1
    1
    2
    4 4
    4
    3
    description
    zero
    diagonal
    tridiagonal
    upper triangular lower triangular
    unstructured
    unstructured
    See Also:
    Serialized Form

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.