org.apache.commons.math3.linear

## Class MatrixUtils.FractionMatrixConverter

- java.lang.Object
- - org.apache.commons.math3.linear.DefaultFieldMatrixPreservingVisitor<Fraction>
  - - org.apache.commons.math3.linear.MatrixUtils.FractionMatrixConverter

- All Implemented Interfaces:
    FieldMatrixPreservingVisitor<Fraction>
  Enclosing class:
    MatrixUtils

      private static class MatrixUtils.FractionMatrixConverter
      extends DefaultFieldMatrixPreservingVisitor<Fraction>

  Converter for `FieldMatrix`/`Fraction`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private double[][]` | `data` Converted array.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MatrixUtils.FractionMatrixConverter()` Simple constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) Array2DRowRealMatrix` | `getConvertedMatrix()` Get the converted matrix.
    `void` | `start(int rows, int columns, int startRow, int endRow, int startColumn, int endColumn)` Start visiting a matrix.
    `void` | `visit(int row, int column, Fraction value)` Visit one matrix entry.

    - ### Methods inherited from class org.apache.commons.math3.linear.DefaultFieldMatrixPreservingVisitor

      `end`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### data

          private double[][] data

      Converted array.

  - ### Constructor Detail

    - #### MatrixUtils.FractionMatrixConverter

          public MatrixUtils.FractionMatrixConverter()

      Simple constructor.

  - ### Method Detail

    - #### start

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

      Start visiting a matrix.

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

      Specified by:
        `start` in interface `FieldMatrixPreservingVisitor<Fraction>`
      Overrides:
        `start` in class `DefaultFieldMatrixPreservingVisitor<Fraction>`
      Parameters:
        `rows` - number of rows of the matrix
        `columns` - number of columns of the matrix
        `startRow` - Initial row index
        `endRow` - Final row index (inclusive)
        `startColumn` - Initial column index
        `endColumn` - Final column index (inclusive)

    - #### visit

          public void visit(int row,
                   int column,
                   Fraction value)

      Visit one matrix entry.
      Specified by:
        `visit` in interface `FieldMatrixPreservingVisitor<Fraction>`
      Overrides:
        `visit` in class `DefaultFieldMatrixPreservingVisitor<Fraction>`
      Parameters:
        `row` - row index of the entry
        `column` - column index of the entry
        `value` - current value of the entry

    - #### getConvertedMatrix

          Array2DRowRealMatrix getConvertedMatrix()

      Get the converted matrix.
      Returns:
        the converted matrix.

Copyright (c) 2003-2013 Apache Software Foundation