Implements static utility functions for used in multigrid method.
More...
|
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...
|
|
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)
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
-
a | Matrix whos value is being increased |
b | Matrix 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
-
a | The 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
-
a | The 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
-
a | The 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
-
a | The 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
-
matrix | The 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
-
a | The 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
-
a | The 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
-
a | Matrix whos value is being increased |
b | Matrix 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
-
a | Matrix whos value is being increased |
b | Double 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
-
u | The matrix for which all values should be set |
val | The 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
-
a | Matrix whos value is being decreased |
b | Matrix 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
-
a | Matrix whos value is being decreased |
b | Matrix containing the values by which to decrease the matrix above |
The documentation for this class was generated from the following file: