SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse
Class SparseElement

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.SparseElement

public final class SparseElement
extends java.lang.Object

This class represents a matrix element in a sparse matrix.


Nested Class Summary
static class SparseElement.TopLeftFirstComparator
          This Comparator can be used when a list of matrix elements are to be sorted according to their coordinates.
 
Field Summary
 Coordinates coordinates
          the coordinates of this element
 double value
          the value of this element
 
Constructor Summary
SparseElement(Coordinates coordinates, double value)
          Create a sparse element with its coordinates and value.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coordinates

public final Coordinates coordinates
the coordinates of this element


value

public final double value
the value of this element

Constructor Detail

SparseElement

public SparseElement(Coordinates coordinates,
                     double value)
Create a sparse element with its coordinates and value.

Parameters:
coordinates - the coordinates of the element
value - the value of the element
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.