SG++-Doxygen-Documentation
|
Functions | |
def | buildAlphaVector (filename) |
Wrapper for buildCoefficientVectorFromFile. More... | |
def | buildCoefficientVectorFromFile (filename) |
Builds the data vector that hold the coefficients fo either the ansatzfuctions or the node base re.sub(regex, replacement, subject) More... | |
def | buildNodevalueVector (filename) |
Wrapper for buildCoefficientVectorFromFile. More... | |
def | buildTrainingVector (data) |
Builds the training data vector. More... | |
def | compareBBTMatrices (m1, m2) |
Compares, if two BBT matrices are "almost" equal. More... | |
def | compareBTMatrices (m1, m2) |
Compares, if two BT matrices are "almost" equal. More... | |
def | compareResultFiles (file1, file2) |
Compares two files and calculates the maximum difference between the values. More... | |
def | doDehierarchisation (alpha, grid) |
hierarchisation of the node base values on a grid More... | |
def | doHierarchisation (node_values, grid) |
hierarchisation of the node base values on a grid More... | |
def | evalFunction (function, points) |
evalutes a given function More... | |
def | generateBBTMatrix (factory, training, verbose=False) |
Generates the BBT DM Matrix for a given grid using numpy. More... | |
def | generateBBTMatrixPython (factory, training, verbose=False) |
Generates the BBT DM Matrix for a given grid only using python arrays. More... | |
def | generateBTMatrix (factory, training, verbose=False) |
Generates the BT DM Matrix for a given grid using numpy. More... | |
def | generateBTMatrixPython (factory, training, verbose=False) |
Generates the BT DM Matrix for a given grid only using python arrays. More... | |
def | generateCMatrix (factory, verbose=False) |
Generates the Laplace Matrix for a given grid using numpy. More... | |
def | openFile (filename) |
Opens a file and returns the stored data. More... | |
def | printNDFunction (filename, filenameValue, grid, alpha, resolution) |
This allows to evaluate a multidimensional function. More... | |
def | printPoint (p, grid, alpha, fout, foutvalue) |
Here a evaluate point on a Sparse Grid is written to a file. More... | |
def | printRefNDFunction (filename, filenameValue, function, resolution, dim) |
This allows to evaluate a multidimensional function. More... | |
def | printRefPoint (points, dim, function, fout, foutvalue) |
Writes reference points to a given file. More... | |
def | readDataVector (filename) |
Reads a DataVector. More... | |
def | readReferenceMatrix (storage, filename) |
Reads a Reference matrix and returns it. More... | |
def | recGenPrintRefVector (dim_rem, dim, points, function, resolution, fout, foutvalue) |
Recursive generation of the function's coordinate string. More... | |
def | recGenPrintVector (dim_rem, p, grid, alpha, resolution, fout, foutvalue) |
Evaluates a mutlidimensional function on a Sparse Grid. More... | |
def | testHierarchisationResults (node1, node2) |
tests the correctness of the hierarchisation and dehierachisation More... | |
def | writeMatrixToFile (filename, matrix, n, m) |
Writes matrix stored in numpy format into a file. More... | |
def python.toolsExtended.buildAlphaVector | ( | filename | ) |
Wrapper for buildCoefficientVectorFromFile.
filename | name of the ARFF file that contains the ansatzfunction coefficients |
References python.toolsExtended.buildCoefficientVectorFromFile().
def 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 |
References python.tools.readDataARFF().
Referenced by python.toolsExtended.buildAlphaVector(), and python.toolsExtended.buildNodevalueVector().
def python.toolsExtended.buildNodevalueVector | ( | filename | ) |
Wrapper for buildCoefficientVectorFromFile.
filename | name of the ARFF file that contains the node base coefficients |
References python.toolsExtended.buildCoefficientVectorFromFile().
def 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 |
def 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 |
def 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 |
def python.toolsExtended.compareResultFiles | ( | file1, | |
file2 | |||
) |
Compares two files and calculates the maximum difference between the values.
file1 | the first file |
file2 | the second file |
Referenced by python.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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 |
References sgpp::op_factory.createOperationHierarchisation().
Referenced by sgpp::base::GridPrinterForStretching.printSparseGrid(), sgpp::base::GridPrinter.printSparseGrid(), sgpp::base::GridPrinterForStretching.printSparseGridExpTransform(), sgpp::base::GridPrinter.printSparseGridExpTransform(), python.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationModLinearRegularTest(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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 |
References sgpp::op_factory.createOperationHierarchisation().
Referenced by python.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationModLinearRegularTest(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationModLinearRegularTest(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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 |
Referenced by python.testcondition.calc_condition().
def 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 |
def 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 |
def 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 |
def 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 |
References sgpp::op_factory.createOperationLaplace().
Referenced by python.testcondition.calc_condition().
def python.toolsExtended.openFile | ( | filename | ) |
Opens a file and returns the stored data.
filename | of file to open |
References python.tools.readDataARFF().
def 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 analyse_erg.file, and python.toolsExtended.recGenPrintVector().
Referenced by python.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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 |
References sgpp::op_factory.createOperationEval().
Referenced by python.toolsExtended.recGenPrintVector().
def 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 analyse_erg.file, and python.toolsExtended.recGenPrintRefVector().
Referenced by python.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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().
def python.toolsExtended.readDataVector | ( | filename | ) |
Reads a DataVector.
filename | the filename of the file that contains the data |
def 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(), and sgpp::combigrid.split().
def 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().
Referenced by python.toolsExtended.printRefNDFunction().
def 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().
Referenced by python.toolsExtended.printNDFunction().
def 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 |
Referenced by python.hierarchisation.runHierarchisationDehierarchisationLinearBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTest(), python.hierarchisation.runHierarchisationDehierarchisationLinearTruncatedBoundaryRegularTestPrintND(), python.hierarchisation.runHierarchisationDehierarchisationModLinearRegularTest(), and python.hierarchisation.runHierarchisationDehierarchisationModLinearTestPrintND().
def 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 |
References analyse_erg.file.