Top Description Fields Constructors Methods
org.apache.commons.math3.linear

public Class DefaultFieldMatrixPreservingVisitor<T extends FieldElement<T>>

extends Object
implements FieldMatrixPreservingVisitor<T extends FieldElement<T>>
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.linear.FieldMatrixPreservingVisitor
Known Direct Subclasses
org.apache.commons.math3.linear.MatrixUtils.FractionMatrixConverter, org.apache.commons.math3.linear.MatrixUtils.BigFractionMatrixConverter
Type Parameters
<T>
the type of the field elements
Imports
org.apache.commons.math3.FieldElement

Default implementation of the FieldMatrixPreservingVisitor interface.

This class is a convenience to create custom visitors without defining all methods. This class provides default implementations that do nothing.

Since
2.0

Field Summary

Modifier and TypeField and Description
private final T
zero

Zero element of the field.

Constructor Summary

AccessConstructor and Description
public
DefaultFieldMatrixPreservingVisitor(final T
additive identity of the field
zero
)

Build a new instance.

Method Summary

Modifier and TypeMethod and Description
public T
public void
start(int
number of rows of the matrix
rows
,
int
number of columns of the matrix
columns
,
int
Initial row index
startRow
,
int
Final row index (inclusive)
endRow
,
int
Initial column index
startColumn
,
int
Final column index (inclusive)
endColumn
)

Implements org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.start.

Start visiting a matrix.

public void
visit(int
row index of the entry
row
,
int
column index of the entry
column
,
T
current value of the entry
value
)

Implements org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.visit.

Visit one matrix entry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

zeroback to summary
private final T zero

Zero element of the field.

Constructor Detail

DefaultFieldMatrixPreservingVisitorback to summary
public DefaultFieldMatrixPreservingVisitor(final T zero)

Build a new instance.

Parameters
zero:T

additive identity of the field

Method Detail

endback to summary
public T end()

Implements org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.end.

Doc from org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.end.

End visiting a matrix.

This method is called once after all entries of the matrix have been visited.

Returns:T

the value that the walkInXxxOrder must return

startback to summary
public void start(int rows, int columns, int startRow, int endRow, int startColumn, int endColumn)

Implements org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.start.

Doc from org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.start.

Start visiting a matrix.

This method is called once before any entry of the matrix is visited.

Parameters
rows:int

number of rows of the matrix

columns:int

number of columns of the matrix

startRow:int

Initial row index

endRow:int

Final row index (inclusive)

startColumn:int

Initial column index

endColumn:int

Final column index (inclusive)

visitback to summary
public void visit(int row, int column, T value)

Implements org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.visit.

Doc from org.apache.commons.math3.linear.FieldMatrixPreservingVisitor.visit.

Visit one matrix entry.

Parameters
row:int

row index of the entry

column:int

column index of the entry

value:T

current value of the entry