linearalgebra.numeric
Class NumericRow

java.lang.Object
  extended by linearalgebra.numeric.NumericRow
All Implemented Interfaces:
java.lang.Cloneable, MatrixInterface, NumericMatrixInterface, NumericRowInterface, RowInterface

public final class NumericRow
extends java.lang.Object
implements NumericRowInterface


Field Summary
private  NumericVectorInterface m_vector
           
 
Constructor Summary
NumericRow(double[] copy)
           
NumericRow(NumericMatrixInterface copy, int row)
           
NumericRow(NumericRow copy)
           
NumericRow(NumericVectorInterface proxy)
           
 
Method Summary
 java.lang.Object clone()
           
 void combineRows(int srcRow, int dstRow, double scalar)
           
 boolean equals(java.lang.Object o)
           
 MatrixInterface factorInverse()
           
 MatrixInterface factorL(PermutationMatrix p)
           
 MatrixInterface factorL(PermutationMatrix p, boolean partialPivot)
           
 MatrixInterface factorU(PermutationMatrix p)
           
 int getColumnBottomPivotIndex(int col)
           
 int getColumnCount()
           
 int getColumnTopPivotIndex(int col)
           
 double getColumnValue(int col)
           
 ColumnInterface getColumnView(int col)
           
 int getDimension()
           
 double getElement(int row, int col)
           
 NumericColumnInterface getNumericColumnView(int col)
           
 NumericRowInterface getNumericRowView(int row)
           
 NumericVectorInterface getNumericVectorView()
           
 MatrixInterface getOrthogonalProjectionMatrix()
           
 MatrixInterface getProjectionMatrix()
           
 MatrixInterface getReflectionMatrix()
           
 int getRowCount()
           
 int getRowLeftPivotIndex(int row)
           
 int getRowRightPivotIndex(int row)
           
 double getRowValue(int row)
           
 RowInterface getRowView(int row)
           
 MatrixInterface getTranspose()
           
 VectorInterface getVectorView()
           
 boolean hasColumnPivot(int col)
           
 boolean hasRowPivot(int row)
           
 void incrementElement(int row, int col, double value)
           
 boolean isIdempotent()
           
 boolean isIdentity()
           
 boolean isLowerLeftTriangular()
           
 boolean isOrthogonal()
           
 boolean isPositiveDefinite()
           
 boolean isSymmetric()
           
 boolean isUpperRightTriangular()
           
 NumericMatrixInterface minus(NumericMatrixInterface m)
           
 NumericMatrixInterface minusEquals(NumericMatrixInterface m)
           
 NumericMatrixInterface multiply(double scalar)
           
 NumericMatrixInterface multiplyEquals(double scalar)
           
 void multiplyRow(int index, double scalar)
           
 NumericMatrixInterface plus(NumericMatrixInterface m)
           
 NumericMatrixInterface plusEquals(NumericMatrixInterface m)
           
 NumericMatrixInterface power(int power)
           
 NumericMatrixInterface product(NumericMatrixInterface right)
           
 void scaleElement(int row, int col, double scalar)
           
 void setElement(int row, int col, double element)
           
 void swapRows(int row1, int row2)
           
 void swapRows(PermutationMatrix p)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_vector

private NumericVectorInterface m_vector
Constructor Detail

NumericRow

public NumericRow(NumericVectorInterface proxy)

NumericRow

public NumericRow(double[] copy)

NumericRow

public NumericRow(NumericMatrixInterface copy,
                  int row)

NumericRow

public NumericRow(NumericRow copy)
Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in interface NumericMatrixInterface
Overrides:
clone in class java.lang.Object

getVectorView

public VectorInterface getVectorView()
Specified by:
getVectorView in interface RowInterface

getNumericVectorView

public NumericVectorInterface getNumericVectorView()
Specified by:
getNumericVectorView in interface NumericRowInterface

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface MatrixInterface

getColumnValue

public double getColumnValue(int col)
Specified by:
getColumnValue in interface NumericRowInterface

getDimension

public int getDimension()

multiplyRow

public void multiplyRow(int index,
                        double scalar)
Specified by:
multiplyRow in interface NumericMatrixInterface

combineRows

public void combineRows(int srcRow,
                        int dstRow,
                        double scalar)
Specified by:
combineRows in interface NumericMatrixInterface

getRowValue

public double getRowValue(int row)

swapRows

public void swapRows(int row1,
                     int row2)
Specified by:
swapRows in interface MatrixInterface

swapRows

public void swapRows(PermutationMatrix p)
Specified by:
swapRows in interface MatrixInterface

hasRowPivot

public boolean hasRowPivot(int row)
Specified by:
hasRowPivot in interface MatrixInterface

hasColumnPivot

public boolean hasColumnPivot(int col)
Specified by:
hasColumnPivot in interface MatrixInterface

getRowLeftPivotIndex

public int getRowLeftPivotIndex(int row)
Specified by:
getRowLeftPivotIndex in interface MatrixInterface

getRowRightPivotIndex

public int getRowRightPivotIndex(int row)
Specified by:
getRowRightPivotIndex in interface MatrixInterface

getColumnTopPivotIndex

public int getColumnTopPivotIndex(int col)
Specified by:
getColumnTopPivotIndex in interface MatrixInterface

getColumnBottomPivotIndex

public int getColumnBottomPivotIndex(int col)
Specified by:
getColumnBottomPivotIndex in interface MatrixInterface

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface MatrixInterface
Specified by:
getColumnCount in interface RowInterface

getElement

public double getElement(int row,
                         int col)
Specified by:
getElement in interface NumericMatrixInterface

plus

public NumericMatrixInterface plus(NumericMatrixInterface m)
Specified by:
plus in interface NumericMatrixInterface

plusEquals

public NumericMatrixInterface plusEquals(NumericMatrixInterface m)
Specified by:
plusEquals in interface NumericMatrixInterface

minus

public NumericMatrixInterface minus(NumericMatrixInterface m)
Specified by:
minus in interface NumericMatrixInterface

minusEquals

public NumericMatrixInterface minusEquals(NumericMatrixInterface m)
Specified by:
minusEquals in interface NumericMatrixInterface

multiply

public NumericMatrixInterface multiply(double scalar)
Specified by:
multiply in interface NumericMatrixInterface

multiplyEquals

public NumericMatrixInterface multiplyEquals(double scalar)
Specified by:
multiplyEquals in interface NumericMatrixInterface

product

public NumericMatrixInterface product(NumericMatrixInterface right)
Specified by:
product in interface NumericMatrixInterface

power

public NumericMatrixInterface power(int power)
Specified by:
power in interface NumericMatrixInterface

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface MatrixInterface
Overrides:
equals in class java.lang.Object

getNumericColumnView

public NumericColumnInterface getNumericColumnView(int col)
Specified by:
getNumericColumnView in interface NumericMatrixInterface

getColumnView

public ColumnInterface getColumnView(int col)

getNumericRowView

public NumericRowInterface getNumericRowView(int row)
Specified by:
getNumericRowView in interface NumericMatrixInterface

getRowView

public RowInterface getRowView(int row)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

factorL

public MatrixInterface factorL(PermutationMatrix p)
Specified by:
factorL in interface MatrixInterface

factorL

public MatrixInterface factorL(PermutationMatrix p,
                               boolean partialPivot)
Specified by:
factorL in interface MatrixInterface

factorU

public MatrixInterface factorU(PermutationMatrix p)
Specified by:
factorU in interface MatrixInterface

factorInverse

public MatrixInterface factorInverse()
                              throws UninvertibleMatrixException
Specified by:
factorInverse in interface MatrixInterface
Throws:
UninvertibleMatrixException

getTranspose

public MatrixInterface getTranspose()
Specified by:
getTranspose in interface MatrixInterface

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in interface MatrixInterface

isUpperRightTriangular

public boolean isUpperRightTriangular()
Specified by:
isUpperRightTriangular in interface MatrixInterface

isLowerLeftTriangular

public boolean isLowerLeftTriangular()
Specified by:
isLowerLeftTriangular in interface MatrixInterface

isSymmetric

public boolean isSymmetric()
Specified by:
isSymmetric in interface MatrixInterface

isPositiveDefinite

public boolean isPositiveDefinite()
Specified by:
isPositiveDefinite in interface MatrixInterface

incrementElement

public void incrementElement(int row,
                             int col,
                             double value)
Specified by:
incrementElement in interface NumericMatrixInterface

scaleElement

public void scaleElement(int row,
                         int col,
                         double scalar)
Specified by:
scaleElement in interface NumericMatrixInterface

setElement

public void setElement(int row,
                       int col,
                       double element)
Specified by:
setElement in interface NumericMatrixInterface

getProjectionMatrix

public MatrixInterface getProjectionMatrix()
Specified by:
getProjectionMatrix in interface MatrixInterface

getOrthogonalProjectionMatrix

public MatrixInterface getOrthogonalProjectionMatrix()
Specified by:
getOrthogonalProjectionMatrix in interface MatrixInterface

getReflectionMatrix

public MatrixInterface getReflectionMatrix()
Specified by:
getReflectionMatrix in interface MatrixInterface

isIdempotent

public boolean isIdempotent()
Specified by:
isIdempotent in interface MatrixInterface

isOrthogonal

public boolean isOrthogonal()
Specified by:
isOrthogonal in interface MatrixInterface