no.uib.cipr.matrix
Class DenseVectorSub

java.lang.Object
  extended by no.uib.cipr.matrix.AbstractVector
      extended by no.uib.cipr.matrix.DenseVectorSub
All Implemented Interfaces:
Serializable, Iterable<VectorEntry>, Vector

public class DenseVectorSub
extends AbstractVector

Wraps a DenseVector, allowing easy access to a sub array of the original without taking copies.

It should be possible to utilise BLAS / LAPACK in various matrix classes. However, as it would be a mammoth task, it will be done on an as-needed basis.

Author:
Sam Halliday
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface no.uib.cipr.matrix.Vector
Vector.Norm
 
Field Summary
 
Fields inherited from class no.uib.cipr.matrix.AbstractVector
size
 
Constructor Summary
DenseVectorSub(DenseVector wrapped, int offset, int size)
           
 
Method Summary
 DenseVector copy()
          Creates a deep copy of the vector
 double get(int index)
          Returns x(index)
 void set(int index, double value)
          x(index) = value
 
Methods inherited from class no.uib.cipr.matrix.AbstractVector
add, add, add, check, checkSize, dot, iterator, norm, norm1, norm2_robust, norm2, normInf, scale, set, set, size, toString, zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DenseVectorSub

public DenseVectorSub(DenseVector wrapped,
                      int offset,
                      int size)
Method Detail

get

public double get(int index)
Description copied from interface: Vector
Returns x(index)

Specified by:
get in interface Vector
Overrides:
get in class AbstractVector

set

public void set(int index,
                double value)
Description copied from interface: Vector
x(index) = value

Specified by:
set in interface Vector
Overrides:
set in class AbstractVector

copy

public DenseVector copy()
Description copied from interface: Vector
Creates a deep copy of the vector

Specified by:
copy in interface Vector
Overrides:
copy in class AbstractVector


Copyright © 2015. All Rights Reserved.