Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.linear
Class MatrixUtils

    java.lang.Object
      org.apache.commons.math.linear.MatrixUtils

public class MatrixUtils
extends Object

A collection of static methods that operate on or return matrices.

Version:
  $Revision: 1.2 $ $Date: 2004/10/25 05:36:15 $

Constructor Summary
`MatrixUtils()` Default constructor.

Method Summary
`static BigMatrix` | `createBigMatrix(BigDecimal[][] data)` Returns a `BigMatrix` whose entries are the the values in the the input array.
`static BigMatrix` | `createBigMatrix(double[][] data)` Returns a `BigMatrix` whose entries are the the values in the the input array.
`static BigMatrix` | `createBigMatrix(String[][] data)` Returns a `BigMatrix` whose entries are the the values in the the input array.
`static BigMatrix` | `createColumnBigMatrix(BigDecimal[] columnData)` Creates a column `BigMatrix` using the data from the input array.
`static BigMatrix` | `createColumnBigMatrix(double[] columnData)` Creates a column `BigMatrix` using the data from the input array.
`static BigMatrix` | `createColumnBigMatrix(String[] columnData)` Creates a column `BigMatrix` using the data from the input array.
`static RealMatrix` | `createColumnRealMatrix(double[] columnData)` Creates a column `RealMatrix` using the data from the input array.
`static RealMatrix` | `createRealMatrix(double[][] data)` Returns a `RealMatrix` whose entries are the the values in the the input array.
`static BigMatrix` | `createRowBigMatrix(BigDecimal[] rowData)` Creates a row `BigMatrix` using the data from the input array.
`static BigMatrix` | `createRowBigMatrix(double[] rowData)` Creates a row `BigMatrix` using the data from the input array.
`static BigMatrix` | `createRowBigMatrix(String[] rowData)` Creates a row `BigMatrix` using the data from the input array.
`static RealMatrix` | `createRowRealMatrix(double[] rowData)` Creates a row `RealMatrix` using the data from the input array.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MatrixUtils

    public MatrixUtils()

  Default constructor. Package scope to prevent unwanted instantiation.

Method Detail

### createRealMatrix

    public static RealMatrix createRealMatrix(double[][] data)

  Returns a `RealMatrix` whose entries are the the values in the the input array. The input array is copied, not referenced.

  Parameters:
    `data` - input array
  Returns:
    RealMatrix containing the values of the array
  Throws:
    `IllegalArgumentException` - if `data` is not rectangular (not all rows have the same length) or empty
    `NullPointerException` - if data is null

### createBigMatrix

    public static BigMatrix createBigMatrix(double[][] data)

  Returns a `BigMatrix` whose entries are the the values in the the input array. The input array is copied, not referenced.

  Parameters:
    `data` - input array
  Returns:
    RealMatrix containing the values of the array
  Throws:
    `IllegalArgumentException` - if `data` is not rectangular (not all rows have the same length) or empty
    `NullPointerException` - if data is null

### createBigMatrix

    public static BigMatrix createBigMatrix(BigDecimal[][] data)

  Returns a `BigMatrix` whose entries are the the values in the the input array. The input array is copied, not referenced.

  Parameters:
    `data` - input array
  Returns:
    RealMatrix containing the values of the array
  Throws:
    `IllegalArgumentException` - if `data` is not rectangular (not all rows have the same length) or empty
    `NullPointerException` - if data is null

### createBigMatrix

    public static BigMatrix createBigMatrix(String[][] data)

  Returns a `BigMatrix` whose entries are the the values in the the input array. The input array is copied, not referenced.

  Parameters:
    `data` - input array
  Returns:
    RealMatrix containing the values of the array
  Throws:
    `IllegalArgumentException` - if `data` is not rectangular (not all rows have the same length) or empty
    `NullPointerException` - if data is null

### createRowRealMatrix

    public static RealMatrix createRowRealMatrix(double[] rowData)

  Creates a row `RealMatrix` using the data from the input array.

  Parameters:
    `rowData` - the input row data
  Returns:
    a 1 x rowData.length RealMatrix
  Throws:
    `IllegalArgumentException` - if `rowData` is empty
    `NullPointerException` - if `rowData`is null

### createRowBigMatrix

    public static BigMatrix createRowBigMatrix(double[] rowData)

  Creates a row `BigMatrix` using the data from the input array.

  Parameters:
    `rowData` - the input row data
  Returns:
    a 1 x rowData.length BigMatrix
  Throws:
    `IllegalArgumentException` - if `rowData` is empty
    `NullPointerException` - if `rowData`is null

### createRowBigMatrix

    public static BigMatrix createRowBigMatrix(BigDecimal[] rowData)

  Creates a row `BigMatrix` using the data from the input array.

  Parameters:
    `rowData` - the input row data
  Returns:
    a 1 x rowData.length BigMatrix
  Throws:
    `IllegalArgumentException` - if `rowData` is empty
    `NullPointerException` - if `rowData`is null

### createRowBigMatrix

    public static BigMatrix createRowBigMatrix(String[] rowData)

  Creates a row `BigMatrix` using the data from the input array.

  Parameters:
    `rowData` - the input row data
  Returns:
    a 1 x rowData.length BigMatrix
  Throws:
    `IllegalArgumentException` - if `rowData` is empty
    `NullPointerException` - if `rowData`is null

### createColumnRealMatrix

    public static RealMatrix createColumnRealMatrix(double[] columnData)

  Creates a column `RealMatrix` using the data from the input array.

  Parameters:
    `columnData` - the input column data
  Returns:
    a columnData x 1 RealMatrix
  Throws:
    `IllegalArgumentException` - if `columnData` is empty
    `NullPointerException` - if `columnData`is null

### createColumnBigMatrix

    public static BigMatrix createColumnBigMatrix(double[] columnData)

  Creates a column `BigMatrix` using the data from the input array.

  Parameters:
    `columnData` - the input column data
  Returns:
    a columnData x 1 BigMatrix
  Throws:
    `IllegalArgumentException` - if `columnData` is empty
    `NullPointerException` - if `columnData`is null

### createColumnBigMatrix

    public static BigMatrix createColumnBigMatrix(BigDecimal[] columnData)

  Creates a column `BigMatrix` using the data from the input array.

  Parameters:
    `columnData` - the input column data
  Returns:
    a columnData x 1 BigMatrix
  Throws:
    `IllegalArgumentException` - if `columnData` is empty
    `NullPointerException` - if `columnData`is null

### createColumnBigMatrix

    public static BigMatrix createColumnBigMatrix(String[] columnData)

  Creates a column `BigMatrix` using the data from the input array.

  Parameters:
    `columnData` - the input column data
  Returns:
    a columnData x 1 BigMatrix
  Throws:
    `IllegalArgumentException` - if `columnData` is empty
    `NullPointerException` - if `columnData`is null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.