Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Static Public Member Functions | List of all members
utils.MatrixOperations Class Reference

Implements static utility functions for used in multigrid method. More...

Static Public Member Functions

static void setValues (double u[][][], double val)
 Set all entries of a specified matrix to a provided value. More...
 
static void addTo (double a[][][], double b[][][])
 Add every entry of matrix b to the corresponding entry in matrix a. More...
 
static void muliplyBy (double a[][][], double b[][][])
 Multiply every entry of matrix a by the corresponding entry in matrix b. More...
 
static void muliplyBy (double a[][][], double b)
 Multiply every entry of matrix a by a specified value b. More...
 
static void subtractFrom (double a[][][], double b[][][])
 Subtract every entry of matrix b from the corresponding entry in matrix a. More...
 
static double[][][] subtract (double a[][][], double b[][][])
 Creates a matrix c by subtracting matrix b from matrix a. More...
 
static double min (double a[][][])
 Find minimum value in a 3D matrix. More...
 
static double max (double a[][][])
 Find maximum value in a 3D matrix. More...
 
static double computeNorm (double[][][] a)
 Compute the norm of a given matrix (exceptuating padding) More...
 
static double computeAverage (double[][][] a)
 Compute the average of a given matrix (exceptuating padding) More...
 
static double computeSum (double[][][] a)
 Compute and return the sum of all elements in the grid, padding excluded. More...
 
static double computeSumP (double[][][] a)
 Compute and return the sum of all elements in the grid, padding included. More...
 
static String matrixToString (double[][][] matrix)
 Write the full matrix to a string. More...
 
static void copyValuesTo (double dest[][][], double src[][][])
 Copy values from an array source to an array destination. More...
 

Detailed Description

Implements static utility functions for used in multigrid method.

Implements static utility functions for used in multigrid method.

Author
João Xavier (xavie.nosp@m.rj@m.nosp@m.skcc..nosp@m.org), Memorial Sloan-Kettering Cancer Center (NY, USA)

Member Function Documentation

static void utils.MatrixOperations.addTo ( double  a[][][],
double  b[][][] 
)
static

Add every entry of matrix b to the corresponding entry in matrix a.

Add every entry of matrix b to the corresponding entry in matrix a

Parameters
aMatrix whos value is being increased
bMatrix of values to add to the matrix above
static double utils.MatrixOperations.computeAverage ( double  a[][][])
static

Compute the average of a given matrix (exceptuating padding)

Compute the average of a given matrix (exceptuating padding)

Parameters
aThe matrix for which the average should be computed
Returns
Double value that is the average of the matrix
static double utils.MatrixOperations.computeNorm ( double  a[][][])
static

Compute the norm of a given matrix (exceptuating padding)

Compute the norm of a given matrix (exceptuating padding)

Parameters
aThe matrix for which the norm should be computed
Returns
Double value that is the norm of the matrix
static double utils.MatrixOperations.computeSum ( double  a[][][])
static

Compute and return the sum of all elements in the grid, padding excluded.

Compute and return the sum of all elements in the grid, padding excluded

Parameters
aThe matrix for which the sum should be computed
Returns
the sum of all elements of a grid
static double utils.MatrixOperations.computeSumP ( double  a[][][])
static

Compute and return the sum of all elements in the grid, padding included.

Compute and return the sum of all elements in the grid, padding included

Parameters
aThe matrix for which the sum should be computed
Returns
the sum of all elements of a grid
static void utils.MatrixOperations.copyValuesTo ( double  dest[][][],
double  src[][][] 
)
static

Copy values from an array source to an array destination.

Copy values from an array source to an array destination

Parameters
dest[][][]Array into which the values should be written
src[][][]Array into which the values should be written
static String utils.MatrixOperations.matrixToString ( double  matrix[][][])
static

Write the full matrix to a string.

Write the full matrix to a string

Parameters
matrixThe matrix which should be written to a string
Returns
a string with the matrix (space separated values)
static double utils.MatrixOperations.max ( double  a[][][])
static

Find maximum value in a 3D matrix.

Find maximum value in a 3D matrix

Parameters
aThe matrix to find the maximum value within
Returns
the maximum value in the matrix
static double utils.MatrixOperations.min ( double  a[][][])
static

Find minimum value in a 3D matrix.

Find minimum value in a 3D matrix

Parameters
aThe matrix to find the minimum value within
Returns
the minimum value in the matrix
static void utils.MatrixOperations.muliplyBy ( double  a[][][],
double  b[][][] 
)
static

Multiply every entry of matrix a by the corresponding entry in matrix b.

Multiply every entry of matrix a to the corresponding entry in matrix b

Parameters
aMatrix whos value is being increased
bMatrix of values to multiply to the matrix above
static void utils.MatrixOperations.muliplyBy ( double  a[][][],
double  b 
)
static

Multiply every entry of matrix a by a specified value b.

Multiply every entry of matrix a by a specified value b

Parameters
aMatrix whos value is being increased
bDouble value by which every entry in the matrix should be multiplied
static void utils.MatrixOperations.setValues ( double  u[][][],
double  val 
)
static

Set all entries of a specified matrix to a provided value.

Set all entries of a specified matrix to a provided value

Parameters
uThe matrix for which all values should be set
valThe value for which all elements should be set
static double [][][] utils.MatrixOperations.subtract ( double  a[][][],
double  b[][][] 
)
static

Creates a matrix c by subtracting matrix b from matrix a.

Parameters
aMatrix whos value is being decreased
bMatrix containing the values by which to decrease the matrix above
Returns
c = a-b The matrix created by this subtraction
static void utils.MatrixOperations.subtractFrom ( double  a[][][],
double  b[][][] 
)
static

Subtract every entry of matrix b from the corresponding entry in matrix a.

Subtract every entry of matrix b from the corresponding entry in matrix a.

Parameters
aMatrix whos value is being decreased
bMatrix containing the values by which to decrease the matrix above

The documentation for this class was generated from the following file: