org.neo4j.graphalgo.impl.util
Class MatrixUtil.DoubleMatrix

java.lang.Object
  extended by org.neo4j.graphalgo.impl.util.MatrixUtil.DoubleMatrix
Enclosing class:
MatrixUtil

public static class MatrixUtil.DoubleMatrix
extends Object

2-Dimensional matrix of doubles.


Constructor Summary
MatrixUtil.DoubleMatrix()
           
 
Method Summary
 Double get(Integer rowIndex, Integer columnIndex)
          Get the value at a certain position.
 MatrixUtil.DoubleVector getRow(Integer rowIndex)
          Gets an entire row as a vector.
 void incrementValue(Integer rowIndex, Integer columnIndex, double increment)
          Increment a value at a certain position.
 void set(Integer rowIndex, Integer columnIndex, double value)
          Set a value at a certain position.
 void setRow(Integer rowIndex, MatrixUtil.DoubleVector row)
          Inserts or replaces an entire row as a vector.
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatrixUtil.DoubleMatrix

public MatrixUtil.DoubleMatrix()
Method Detail

incrementValue

public void incrementValue(Integer rowIndex,
                           Integer columnIndex,
                           double increment)
Increment a value at a certain position.

Parameters:
rowIndex -
columnIndex -
increment -

set

public void set(Integer rowIndex,
                Integer columnIndex,
                double value)
Set a value at a certain position.

Parameters:
rowIndex -
columnIndex -
value -

get

public Double get(Integer rowIndex,
                  Integer columnIndex)
Get the value at a certain position.

Parameters:
rowIndex -
columnIndex -
Returns:
The value or null.

getRow

public MatrixUtil.DoubleVector getRow(Integer rowIndex)
Gets an entire row as a vector.

Parameters:
rowIndex -
Returns:
The row vector or null.

setRow

public void setRow(Integer rowIndex,
                   MatrixUtil.DoubleVector row)
Inserts or replaces an entire row as a vector.

Parameters:
rowIndex -
row -

toString

public String toString()
Overrides:
toString in class Object

size

public int size()
Returns:
The number of rows in the matrix.


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.