com.stata.sfi
Class Matrix

java.lang.Object
  extended by com.stata.sfi.Matrix

public final class Matrix
extends Object

Routines for interacting with a Stata matrix.


Method Summary
static double[] getMatrix(String name)
          Get the data in a Stata matrix.
static int getMatrixCol(String name)
          Get the number of columns in a Stata matrix.
static String[] getMatrixColNames(String name)
          Get the column names in a Stata matrix.
static int getMatrixRow(String name)
          Get the number of rows in a Stata matrix.
static String[] getMatrixRowNames(String name)
          Get the row names in a Stata matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMatrix

public static double[] getMatrix(String name)
Get the data in a Stata matrix.

Parameters:
name - Name of the Stata matrix.
Returns:
A double array containing the matrix values. If an error occurs null will be returned.

getMatrixRow

public static int getMatrixRow(String name)
Get the number of rows in a Stata matrix.

Parameters:
name - Name of the Stata matrix.
Returns:
The number of rows. If an error occurs -1 will be returned.

getMatrixCol

public static int getMatrixCol(String name)
Get the number of columns in a Stata matrix.

Parameters:
name - Name of the Stata matrix.
Returns:
The number of columns. If an error occurs -1 will be returned.

getMatrixRowNames

public static String[] getMatrixRowNames(String name)
Get the row names in a Stata matrix.

Parameters:
name - Name of the Stata matrix.
Returns:
A String array containing the row names of the matrix. If an error occurs null will be returned.

getMatrixColNames

public static String[] getMatrixColNames(String name)
Get the column names in a Stata matrix.

Parameters:
name - Name of the Stata matrix.
Returns:
A String array containing the column names of the matrix. If an error occurs null will be returned.