SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.datastructure
Class MathTable.Row

java.lang.Object
  extended by com.numericalmethod.suanshu.datastructure.MathTable.Row
Enclosing class:
MathTable

public class MathTable.Row
extends java.lang.Object

This class represents a row in a mathematical table. A row, indexed by a double, contains several double values, by columns.

This class is immutable.


Field Summary
 double index
          the row index, a double
 
Method Summary
 double get(int columnIndex)
          Get the value in a column.
 double get(java.lang.String header)
          Get the value in a column.
 double[] toArray()
          Convert the row to a double array, double[], excluding the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

public final double index
the row index, a double

Method Detail

get

public double get(int columnIndex)
Get the value in a column.

Parameters:
columnIndex - the column index, counting from 1
Returns:
the corresponding column value in the row

get

public double get(java.lang.String header)
Get the value in a column.

Parameters:
header - the column name
Returns:
the corresponding column value in the row

toArray

public double[] toArray()
Convert the row to a double array, double[], excluding the index.

Returns:
the double[] representation of the column values

SuanShu, a Java numerical and statistical library

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