Skip to content

Commit

Permalink
Small refinements in base/examples
Browse files Browse the repository at this point in the history
git-svn-id: https://ipvs.informatik.uni-stuttgart.de/SGpp/repos/trunk@5059 4eea3252-f0fb-4393-894d-40516dce545b
  • Loading branch information
Sekuraz committed Oct 13, 2015
1 parent 4fff299 commit dff01cd
Show file tree
Hide file tree
Showing 18 changed files with 29,091 additions and 13 deletions.
20 changes: 20 additions & 0 deletions base/doc/doxygen/examples.doxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
@page examples Examples

This is a collection of examples from all modules.
To add new examples to the documentation,
go to the respective folder module/doc/doxygen/ and
add a new example file code_examples_NAME.doxy with doxygen-internal
name code_examples_NAME.

Note that SCons automatically compiles (but not runs)
all C++ examples on each run.
For this to work, the examples must lie in the directories of the form
\c /path/to/SGpp/trunk/MODULE_NAME/examples.

- @subpage code_examples_continued_learning
- @subpage code_examples_quick_start
- @subpage code_examples_refinement
- @subpage code_examples_quadrature
- @subpage code_examples_optimization
**/
60 changes: 60 additions & 0 deletions base/doc/doxygen/modules.doxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
@page modules Description of Modules

SG++ is grouped into several modules. This ensures
- Modularity - not all parts are required for every task
- Usability - not everything has to be compiled every time
- Flexibility - only parts of SG++ can be shipped
- Correctness - at least to some degree; if some part is modified, it will not influence others
- ...

The modules correspond to the corresponding namespaces in C++. Roughly, all files belonging to a namespace belong to the respective module. But a module can contain files belonging to some another namespace, especially static factory methods in the namespace SGPP::op_factory.

<!--
@dot
digraph G {
rankdir=BT;
node [shape=polygon,fontsize=10,height=0.25];
edge [group];

{ rank=same; datadriven; solver; combigrid; }

}
@enddot
-->

The modules can depend on each other. Especially all depend on the base module.
Libraries are generated for all modules. The following modules are available:

- @subpage module_datadriven
- @subpage module_finance
- @subpage module_quadrature
- @subpage module_combigrid
- @subpage module_parallel
- @subpage module_solver
- @subpage module_misc
- @subpage module_pde
- @subpage module_base
- @subpage module_optimization

@section modules__structure Folder structure

Please note that the modularization results in a somewhat unconventional
folder structure. Keeping
@verbatim
/path/to/SGpp/module/
@endverbatim
as "modular" as possible requires to have everything belonging to a module
below that directory. This especially applies to the src folder. Its
subdirectories reflect the namespaces. Therefore, the module name reappears
once again:
@verbatim
/path/to/SGpp/module/src/sgpp/module/...
@endverbatim


@section modules__creatingnew Creating new modules

T.b.d.

*/
Binary file added base/examples/c++_simple
Binary file not shown.
Binary file added base/examples/c++_simple_predictive_refinement
Binary file not shown.
13 changes: 0 additions & 13 deletions base/examples/c++_simple_predictive_refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,6 @@ int main() {
// hierarchize
SGPP::op_factory::createOperationHierarchisation(*grid)->doHierarchisation(alpha);

DataVector* xCoordinates = new DataVector(0);
DataVector* yCoordinates = new DataVector(0);

//print all points
OperationEval* opEval = SGPP::op_factory::createOperationEval(*grid);

for (size_t i = 0; i < hashGridStorage->size(); i++) {
hashGridStorage->get(i)->getCoords(gridPointCoordinates);
xCoordinates->append(gridPointCoordinates[0]);
yCoordinates->append(gridPointCoordinates[1]);
opEval->eval(alpha, gridPointCoordinates);
}

// calculate squared offset
DataVector errorVector(dataSet.getNrows());
calculateError(dataSet, *grid, alpha, errorVector);
Expand Down
Binary file added base/examples/c++_simple_quadrature
Binary file not shown.
Binary file added base/examples/c++_simple_refinement
Binary file not shown.
Binary file added base/tests/test_base_boost
Binary file not shown.
Binary file added combigrid/examples/combi_classic
Binary file not shown.
Binary file added datadriven/examples/batchLearnerExample
Binary file not shown.
Binary file added datadriven/examples/learnerSGDETest
Binary file not shown.
Binary file added datadriven/examples/multTest
Binary file not shown.
Binary file added datadriven/examples/multTransposeTest
Binary file not shown.
Binary file added datadriven/tests/test_datadriven_boost
Binary file not shown.
Binary file added misc/tests/test_misc_boost
Binary file not shown.
Binary file added optimization/tests/test_optimization_boost
Binary file not shown.
Loading

0 comments on commit dff01cd

Please sign in to comment.