![]() |
SG++-Doxygen-Documentation
|
Functions | |
buildAlphaVector (filename) | |
Wrapper for buildCoefficientVectorFromFile. | |
buildCoefficientVectorFromFile (filename) | |
Builds the data vector that hold the coefficients fo either the ansatzfuctions or the node base re.sub(regex, replacement, subject) | |
buildNodevalueVector (filename) | |
Wrapper for buildCoefficientVectorFromFile. | |
buildTrainingVector (data) | |
Builds the training data vector. | |
compareBBTMatrices (m1, m2) | |
Compares, if two BBT matrices are "almost" equal. | |
compareBTMatrices (m1, m2) | |
Compares, if two BT matrices are "almost" equal. | |
compareResultFiles (file1, file2) | |
Compares two files and calculates the maximum difference between the values. | |
doDehierarchisation (alpha, grid) | |
hierarchisation of the node base values on a grid | |
doHierarchisation (node_values, grid) | |
hierarchisation of the node base values on a grid | |
evalFunction (function, points) | |
evalutes a given function | |
generateBBTMatrix (factory, training, verbose=False) | |
Generates the BBT DM Matrix for a given grid using numpy. | |
generateBBTMatrixPython (factory, training, verbose=False) | |
Generates the BBT DM Matrix for a given grid only using python arrays. | |
generateBTMatrix (factory, training, verbose=False) | |
Generates the BT DM Matrix for a given grid using numpy. | |
generateBTMatrixPython (factory, training, verbose=False) | |
Generates the BT DM Matrix for a given grid only using python arrays. | |
generateCMatrix (factory, verbose=False) | |
Generates the Laplace Matrix for a given grid using numpy. | |
openFile (filename) | |
Opens a file and returns the stored data. | |
printNDFunction (filename, filenameValue, grid, alpha, resolution) | |
This allows to evaluate a multidimensional function. | |
printPoint (p, grid, alpha, fout, foutvalue) | |
Here a evaluate point on a Sparse Grid is written to a file. | |
printRefNDFunction (filename, filenameValue, function, resolution, dim) | |
This allows to evaluate a multidimensional function. | |
printRefPoint (points, dim, function, fout, foutvalue) | |
Writes reference points to a given file. | |
readDataVector (filename) | |
Reads a DataVector. | |
readReferenceMatrix (storage, filename) | |
Reads a Reference matrix and returns it. | |
recGenPrintRefVector (dim_rem, dim, points, function, resolution, fout, foutvalue) | |
Recursive generation of the function's coordinate string. | |
recGenPrintVector (dim_rem, p, grid, alpha, resolution, fout, foutvalue) | |
Evaluates a mutlidimensional function on a Sparse Grid. | |
testHierarchisationResults (node1, node2) | |
tests the correctness of the hierarchisation and dehierachisation | |
writeMatrixToFile (filename, matrix, n, m) | |
Writes matrix stored in numpy format into a file. | |
python.toolsExtended.buildAlphaVector | ( | filename | ) |
Wrapper for buildCoefficientVectorFromFile.
filename | name of the ARFF file that contains the ansatzfunction coefficients |
References python.toolsExtended.buildCoefficientVectorFromFile().
python.toolsExtended.buildCoefficientVectorFromFile | ( | filename | ) |
Builds the data vector that hold the coefficients fo either the ansatzfuctions or the node base re.sub(regex, replacement, subject)
filename | name of the ARFF file that contains the coefficients |
Referenced by python.toolsExtended.buildAlphaVector(), and python.toolsExtended.buildNodevalueVector().
python.toolsExtended.buildNodevalueVector | ( | filename | ) |
Wrapper for buildCoefficientVectorFromFile.
filename | name of the ARFF file that contains the node base coefficients |
References python.toolsExtended.buildCoefficientVectorFromFile().
python.toolsExtended.buildTrainingVector | ( | data | ) |
Builds the training data vector.
data | a list of lists that contains the points a the training data set, coordinate-wise |
python.toolsExtended.compareBBTMatrices | ( | m1, | |
m2 | |||
) |
Compares, if two BBT matrices are "almost" equal.
Has to handle the problem that the underlying grid was ordered differently. Uses heuristics, e.g. whether the diagonal elements and row and column sums match. and prints the result for each element
m1 | the first matrix |
m2 | the second matrix |
python.toolsExtended.compareBTMatrices | ( | m1, | |
m2 | |||
) |
Compares, if two BT matrices are "almost" equal.
Has to handle the problem that the underlying grid was ordered differently. Uses heuristics, e.g. whether the row and column sums match. and prints the result for each element
m1 | the first matrix |
m2 | the second matrix |
python.toolsExtended.compareResultFiles | ( | file1, | |
file2 | |||
) |
Compares two files and calculates the maximum difference between the values.
file1 | the first file |
file2 | the second file |
python.toolsExtended.doDehierarchisation | ( | alpha, | |
grid | |||
) |
hierarchisation of the node base values on a grid
alpha | DataVector that holds the coefficients of the sparse grid's ansatzfunctions |
grid | thee grid matching to the alpha vector |
python.toolsExtended.doHierarchisation | ( | node_values, | |
grid | |||
) |
hierarchisation of the node base values on a grid
node_values | DataVector that holds the coefficients of the function's node base |
grid | the grid matching to the node_vector |
python.toolsExtended.evalFunction | ( | function, | |
points | |||
) |
evalutes a given function
function | a string the gives the function; x1...xn must be the names of the placeholders |
points | sorted list of the coordinates (x1...xn) of evaluation point |
Referenced by python.toolsExtended.printRefPoint().
python.toolsExtended.generateBBTMatrix | ( | factory, | |
training, | |||
verbose = False |
|||
) |
Generates the BBT DM Matrix for a given grid using numpy.
factory | the grid object |
training | DataVector to contains the used training data |
verbose | default:False prints some additional information |
python.toolsExtended.generateBBTMatrixPython | ( | factory, | |
training, | |||
verbose = False |
|||
) |
Generates the BBT DM Matrix for a given grid only using python arrays.
factory | the grid object |
training | DataVector to contains the used training data |
verbose | default:False prints some additional information |
python.toolsExtended.generateBTMatrix | ( | factory, | |
training, | |||
verbose = False |
|||
) |
Generates the BT DM Matrix for a given grid using numpy.
factory | the grid object |
training | DataVector to contains the used training data |
verbose | default:False prints some additional information |
python.toolsExtended.generateBTMatrixPython | ( | factory, | |
training, | |||
verbose = False |
|||
) |
Generates the BT DM Matrix for a given grid only using python arrays.
factory | the grid object |
training | DataVector to contains the used training data |
verbose | default:False prints some additional information |
python.toolsExtended.generateCMatrix | ( | factory, | |
verbose = False |
|||
) |
Generates the Laplace Matrix for a given grid using numpy.
factory | the grid object |
verbose | default:False prints some additional information |
python.toolsExtended.openFile | ( | filename | ) |
Opens a file and returns the stored data.
filename | of file to open |
python.toolsExtended.printNDFunction | ( | filename, | |
filenameValue, | |||
grid, | |||
alpha, | |||
resolution | |||
) |
This allows to evaluate a multidimensional function.
filename | filename of file with coordinates and function values |
filenameValue | filename of file with function values only |
grid | reference to the Sparse Grid |
alpha | hierarchical surplus of the Sparse Grid's Ansatzfunctions |
resolution | number of evaluating points |
References python.toolsExtended.recGenPrintVector().
python.toolsExtended.printPoint | ( | p, | |
grid, | |||
alpha, | |||
fout, | |||
foutvalue | |||
) |
Here a evaluate point on a Sparse Grid is written to a file.
p | DataVector containing the coordinates of the point |
grid | reference to the Sparse Grid |
alpha | hierarchical surplus of the Sparse Grid's Ansatzfunctions |
fout | filehandle to result file, containing the coordinates and value |
foutvalue | filehandle to resultfile, containing only the value |
Referenced by python.toolsExtended.recGenPrintVector().
python.toolsExtended.printRefNDFunction | ( | filename, | |
filenameValue, | |||
function, | |||
resolution, | |||
dim | |||
) |
This allows to evaluate a multidimensional function.
filename | filename of file with coordinates and function values |
filenameValue | filename of file with function values only |
function | string that describes the function to evaluate |
resolution | number of evaluating points |
dim | dimension of function |
References python.toolsExtended.recGenPrintRefVector().
python.toolsExtended.printRefPoint | ( | points, | |
dim, | |||
function, | |||
fout, | |||
foutvalue | |||
) |
Writes reference points to a given file.
points | string containing the evaluation potins |
dim | the dimension of the function |
function | string that describes the function to evaluate |
fout | filehandle to result file, containing the coordinates and value |
foutvalue | filehandle to resultfile, containing only the value |
References python.toolsExtended.evalFunction().
Referenced by python.toolsExtended.recGenPrintRefVector().
python.toolsExtended.readDataVector | ( | filename | ) |
Reads a DataVector.
filename | the filename of the file that contains the data |
python.toolsExtended.readReferenceMatrix | ( | storage, | |
filename | |||
) |
Reads a Reference matrix and returns it.
storage | storage of the grid |
filename | the filename of the file that contains the reference data |
References python.tools.gzOpen().
python.toolsExtended.recGenPrintRefVector | ( | dim_rem, | |
dim, | |||
points, | |||
function, | |||
resolution, | |||
fout, | |||
foutvalue | |||
) |
Recursive generation of the function's coordinate string.
dim_rem | remaining dimensions |
dim | dimension of function |
points | current coordinate string |
function | string that describes the function to evaluate |
resolution | number of supporting points |
fout | filehandle to result file, containing the coordinates and value |
foutvalue | filehandle to resultfile, containing only the value |
References python.toolsExtended.printRefPoint(), and python.toolsExtended.recGenPrintRefVector().
Referenced by python.toolsExtended.printRefNDFunction(), and python.toolsExtended.recGenPrintRefVector().
python.toolsExtended.recGenPrintVector | ( | dim_rem, | |
p, | |||
grid, | |||
alpha, | |||
resolution, | |||
fout, | |||
foutvalue | |||
) |
Evaluates a mutlidimensional function on a Sparse Grid.
dim_rem | remaining dimensions |
p | DataVector containing the coordinates of the point |
grid | reference to the Sparse Grid |
alpha | hierarchical surplus of the Sparse Grid's Ansatzfunctions |
resolution | number of evaluating points |
fout | filehandle to result file, containing the coordinates and value |
foutvalue | filehandle to resultfile, containing only the value |
References python.toolsExtended.printPoint(), and python.toolsExtended.recGenPrintVector().
Referenced by python.toolsExtended.printNDFunction(), and python.toolsExtended.recGenPrintVector().
python.toolsExtended.testHierarchisationResults | ( | node1, | |
node2 | |||
) |
tests the correctness of the hierarchisation and dehierachisation
node1 | the vector of the node base values before hierarchisation and dehierarchisation |
node2 | the vector of the node base values after hierarchisation and dehierarchisation |
python.toolsExtended.writeMatrixToFile | ( | filename, | |
matrix, | |||
n, | |||
m | |||
) |
Writes matrix stored in numpy format into a file.
filename | file's filename to which the data is written |
matrix | the matrix that should be stored |
n | number of rows |
m | number of columns |