Major code reorganization
DO NOT MERGE: work in progress
This PR cleans and reorganizes the code into packages, rather than scattered m-files in private/ and library/. The idea is to organize the code in the forbes package (`+forbes/' folder), and:
forbes.functionspackage (+forbes/+functions/folder): classes encoding the mathematical functions to be used to define problems;forbes.fbepackage (+forbes/+fbe/folder): utility classes for evaluating forward-backward steps and the FBE;forbes.problemspackage (+forbes/+problems/folder): classes representing problems;forbes.utilspackage (+forbes/+utils/folder): various utilities;forbes.testspackage (+forbes/+tests/folder): test scripts.
The end user really cares about the forbes.functions package, which is used to constructs the terms defining the problem to be solved.
TODO
Many mathematical functions previously in library/ were already ported into the forbes.functions package, but not all of them. Furthermore, solvers-related code is still in private/. Therefore, before merging, we should:
- [ ] port all available mathematical functions to the
forbes.functionspackage; - [ ] move solvers-related code from
private/to aforbes.solverspackage.
What's next
Solvers should be a lot more readable. I guess one way to do that is to use classes also there: store the state of the algorithm into properties, and have methods initialize, iterate (which runs one iteration) and stop (that checks the stopping condition).