gausselim.pivoting
Class RowPivoting

java.lang.Object
  extended by gausselim.pivoting.RowPivoting
All Implemented Interfaces:
PivotingMethod

public class RowPivoting
extends java.lang.Object
implements PivotingMethod

Row pivoting (also called partial pivoting).


Constructor Summary
RowPivoting()
           
 
Method Summary
 int[] pivot(java.math.BigDecimal[][] a, java.math.BigDecimal[] b, int step, java.math.MathContext mc)
          Perform row pivoting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowPivoting

public RowPivoting()
Method Detail

pivot

public int[] pivot(java.math.BigDecimal[][] a,
                   java.math.BigDecimal[] b,
                   int step,
                   java.math.MathContext mc)
Perform row pivoting. At step k, this method selects the first row i so that i >= k and |A(i,k)| >= |A(j,k)| for any other j >= k. Rows i and k are then swapped.

Specified by:
pivot in interface PivotingMethod
Returns:
index (row, column) of the selected pivot element.