Groovy Documentation

[Groovy] Class MatrixColumn

java.lang.Object
  MatrixColumn
All Implemented Interfaces:
java.lang.Iterable

class MatrixColumn

A proxy object representing a column in a matrix.

The data in a Matrix is stored natively in row format. That is, each row is stored as a native Java array of double values. This makes accessing data by row very efficient, but doesn't give you an easy way to pass around or treat a column of values as a collection without first copying them to another data structure. This class wraps an Iterable interface around a column of values without actually copying the data. It does this keeps a reference to the underlying matrix and implements iteration and random access (via square bracket notation) by reflecting values into the appropriate column of the underlying Matrix.

Authors:
simon.sadedin@mcri.edu.au


Property Summary
int columnIndex

String name

Matrix sourceMatrix

 
Constructor Summary
MatrixColumn()

 
Method Summary
java.lang.Object asType(java.lang.Class c)

boolean equals(java.lang.Object o)

java.lang.Object getAt(java.lang.Object index)

double getDoubleAt(int index)

java.util.Iterator iterator()

int size()

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

columnIndex

int columnIndex


name

String name


sourceMatrix

Matrix sourceMatrix


 
Constructor Detail

MatrixColumn

MatrixColumn()


 
Method Detail

asType

java.lang.Object asType(java.lang.Class c)


equals

boolean equals(java.lang.Object o)


getAt

java.lang.Object getAt(java.lang.Object index)


getDoubleAt

@CompileStatic
double getDoubleAt(int index)


iterator

java.util.Iterator iterator()


size

int size()


toString

java.lang.String toString()


 

Groovy Documentation