SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.operation
Class MatrixUtils

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.operation.MatrixUtils

public class MatrixUtils
extends java.lang.Object

This class collects a set of utility functions to operate on matrices.


Constructor Summary
MatrixUtils()
           
 
Method Summary
static int[] colSums(Matrix A)
           
static int[] rowSums(Matrix A)
           
static double[] to1DArray(Matrix A)
          Get all matrix entries in the form of a 1D double[] array.
static double[][] to2DArray(Matrix A)
          Get all matrix entries in the form of a 2D double[][] array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixUtils

public MatrixUtils()
Method Detail

rowSums

public static int[] rowSums(Matrix A)

colSums

public static int[] colSums(Matrix A)

to1DArray

public static double[] to1DArray(Matrix A)
Get all matrix entries in the form of a 1D double[] array.

Returns:
all matrix entries as a double[] which is an independent copy

to2DArray

public static double[][] to2DArray(Matrix A)
Get all matrix entries in the form of a 2D double[][] array.

Returns:
all matrix entries as a double[][] which is an independent copy

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.