baseCode.dataStructure.matrix
Class DenseDoubleMatrix1D

java.lang.Object
  extended bycern.colt.PersistentObject
      extended bycern.colt.matrix.impl.AbstractMatrix
          extended bycern.colt.matrix.impl.AbstractMatrix1D
              extended bycern.colt.matrix.DoubleMatrix1D
                  extended bycern.colt.matrix.impl.DenseDoubleMatrix1D
                      extended bybaseCode.dataStructure.matrix.DenseDoubleMatrix1D
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DenseDoubleMatrix1D
extends cern.colt.matrix.impl.DenseDoubleMatrix1D

Use this class when fast iteration over the matrix is of primary interest. The primary change is that getQuick is faster, and toArray returns the actual elements, not a copy. The latter is an important change to the contract of DouleMatrix1D, the former might have some unintended consequences because it hasn't been tested thoroughly.


Copyright (c) 2004 Columbia University

Version:
$Id: DenseDoubleMatrix1D.java,v 1.3 2004/08/17 21:17:41 pavlidis Exp $
Author:
pavlidis
See Also:
Serialized Form

Field Summary
 
Fields inherited from class cern.colt.matrix.impl.DenseDoubleMatrix1D
elements
 
Fields inherited from class cern.colt.matrix.impl.AbstractMatrix1D
size, stride, zero
 
Fields inherited from class cern.colt.matrix.impl.AbstractMatrix
isNoView
 
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
 
Constructor Summary
  DenseDoubleMatrix1D(double[] values)
           
  DenseDoubleMatrix1D(int size)
           
protected DenseDoubleMatrix1D(int size, double[] elements, int zero, int stride)
           
 
Method Summary
 double getQuick(int i)
          This is an optimized version of getQuick.
 double[] toArray()
          WARNING unlike the superclass, this returns the actual underlying array, not a copy.
 
Methods inherited from class cern.colt.matrix.impl.DenseDoubleMatrix1D
assign, assign, assign, assign, assign, cardinality, haveSharedCellsRaw, index, like, like2D, setQuick, swap, toArray, viewSelectionLike, zDotProduct, zSum
 
Methods inherited from class cern.colt.matrix.DoubleMatrix1D
aggregate, aggregate, assign, cardinality, copy, equals, equals, get, getContent, getNonZeros, getNonZeros, haveSharedCells, like, set, toString, view, viewFlip, viewPart, viewSelection, viewSelection, viewSorted, viewStrides, zDotProduct, zDotProduct, zDotProduct
 
Methods inherited from class cern.colt.matrix.impl.AbstractMatrix1D
_offset, _rank, checkIndex, checkIndexes, checkRange, checkSize, checkSize, setUp, setUp, size, stride, toStringShort, vFlip, vPart, vStrides
 
Methods inherited from class cern.colt.matrix.impl.AbstractMatrix
ensureCapacity, isView, trimToSize
 
Methods inherited from class cern.colt.PersistentObject
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DenseDoubleMatrix1D

protected DenseDoubleMatrix1D(int size,
                              double[] elements,
                              int zero,
                              int stride)
Parameters:
size -
elements -
zero -
stride -

DenseDoubleMatrix1D

public DenseDoubleMatrix1D(double[] values)
Parameters:
values -

DenseDoubleMatrix1D

public DenseDoubleMatrix1D(int size)
Parameters:
size -
Method Detail

getQuick

public double getQuick(int i)
This is an optimized version of getQuick. Implementation note: the superclass uses an add and a multiply. This is faster, but there might be unforseen consequences...

See Also:
DoubleMatrix1D.getQuick(int)

toArray

public double[] toArray()
WARNING unlike the superclass, this returns the actual underlying array, not a copy.

Returns:
the elements
See Also:
DoubleMatrix1D.toArray()


Copyright © 2003-2005 Columbia University. All Rights Reserved.