|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| benchmarks/ | H | 03-May-2022 | - | 2,208 | 1,801 |
| cmake/ | H | 13-Nov-2020 | - | 3 | 2 |
| examples/ | H | 03-May-2022 | - | 5,099 | 3,966 |
| include/ | H | 13-Nov-2020 | - | 17 | 13 |
| profiling/ | H | 03-May-2022 | - | 363,980 | 355,195 |
| pyexamples/ | H | 03-May-2022 | - | 555 | 371 |
| src/ | H | 03-May-2022 | - | 2,061,518 | 2,034,696 |
| test/ | H | 03-May-2022 | - | 31,920 | 21,707 |
| utilities/ | H | 03-May-2022 | - | 1,659 | 1,226 |
| wrappers/ | H | 13-Nov-2020 | - | 4,532 | 3,373 |
| LICENSE | H A D | 13-Nov-2020 | 1.9 KiB | 23 | 14 |
| NOTES | H A D | 13-Nov-2020 | 233 | 3 | 2 |
| README.md | H A D | 13-Nov-2020 | 4.2 KiB | 130 | 94 |
| VERSION.dakota | H A D | 13-Nov-2020 | 17 | 2 | 1 |
| c3.cmake | H A D | 13-Nov-2020 | 929 | 18 | 18 |
README.md
1# Compressed Continuous Computation (C3)
2> Computing with functions
3
4The Compressed Continuous Computation (C3) package is intended to make it easy to perform continuous linear and multilinear algebra with multidimensional functions. It works by representing multidimensional functions in a low-rank format. Common tasks include taking "matrix" decompositions of vector- or matrix-valued functions, adding or multiplying functions together, integrating multidimensional functions, and much much more. The following is a sampling of capabilities
5* Adaptive approximation of a black-box model (specified as a function pointer)
6* Regression of a model from data
7* Both linear and nonlinear approximation
8* Approximation in polynomial, piecewise polynomial, linear element, and radial basis function spaces
9* General adaptive integration schemes
10* Differentiation
11* Multiplication
12* Addition
13* Rounding
14* Computing Jacobians and Hessians
15* UQ
16 1) Expectation and variance
17 2) Sobol sensitivities
18
19In addition to the above capabilities, which are unique to the C3 package, I also have general optimization routines including
20* BFGS
21* LBFGS
22* Gradient descent
23* Stochastic Gradient with ADAM
24
25
26Documentation of most functions is provided by Doxygen here:
27http://alexgorodetsky.com/c3doc/html/
28
29## Installation / Getting started
30
31The dependencies for this code are
32 1) BLAS
33 2) LAPACK
34 3) SWIG (if building non-C interfaces)
35
36```shell
37git clone https://github.com/goroda/Compressed-Continuous-Computation.git c3
38cd c3
39mkdir build
40cd build
41cmake ..
42make
43```
44
45This will install all shared libraries into c3/build/src. The main shared library is libc3, the rest are all submodules. To install to a particular location use
46
47``` shell
48cmake .. -DCMAKE_INSTALL_PREFIX=/your/choice
49make install
50```
51
52### Python interface
53
54I have created a partial python interface to the library. This library requires SWIG. To compile and install the python wrappers see the CMake option MAKE_PYTHON_WRAPPERS below.
55
56The modules will be created in wrappers/python. I have created a FunctionTrain class in the wrappers/python/c3py.py.
57
58To enable proper access to the python library add the following to your environmental variables
59``` shell
60export C3HOME=~/Software/c3
61export PYC3=${C3HOME}/wrappers/python
62export PYTHONPATH=$PYTHONPATH:${PYC3}
63```
64
65Then, one can run the examples from the root c3 directory as
66``` shell
67python wrappers/python/pytest.py
68```
69
70## Configuration Options
71
72#### BUILD_STATIC_LIB
73Default: `OFF'
74
75Using this option can toggle whether or not static or shared libraries should be built.
76
77**Note: This option cannot be set to ON if building the python wrapper**
78
79#### BUILD_SUB_LIBS
80Default: `OFF'
81
82Using this option can toggle whether or not to build each sub-library into its own library
83
84#### MAKE_PYTHON_WRAPPERS
85Default: `OFF'
86
87Using this option can toggle whether or not to compile the python wrappers. To specify specific python installations use the CMake options defined [here](https://cmake.org/cmake/help/v3.0/module/FindPythonLibs.html).
88
89After specifying this option, the commands to compile the library and wrappers are
90``` shell
91make
92make PyWrapper
93```
94
95## Systems I have tested on
96
971) Mac OS X with clang version 8.0
982) Ubuntu with gcc version 5.0
99
100
101## Solutions to some possible problems
102
103### Error: Unable to find 'python.swg'
104
105On Mac OS X, if SWIG is installed with macports using
106```shell
107sudo port install swig
108```
109then the above error might occur. To remedy this error install the swig-python package
110```shell
111sudo port install swig-python
112```
113
114## Coding practices
115
116I aim to document (with Doxygen) every function available to the user and provide a unit test. Furthermore, I won't push code to the master branch that has memory leaks. I am constantly looking for more suggestions for improving the robustness of the code if any issues are encountered.
117
118## Contributing
119
120Please open a Github issue to ask a question, report a bug, or to request features.
121To contribute, fork the repository and setup a branch.
122
123Author: [Alex A. Gorodetsky](https://www.alexgorodetsky.com)
124Contact: [goroda@umich.edu](mailto:goroda@umich.edu)
125Copyright (c) 2014-2016, Massachusetts Institute of Technology
126Copyright (c) 2016-2017, Sandia National Laboratories
127Copyright (c) 2018, University of Michigan
128License: BSD
129
130