Skip to content

Conversation

lostella
Copy link
Member

@lostella lostella commented Sep 1, 2017

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.functions package (+forbes/+functions/ folder): classes encoding the mathematical functions to be used to define problems;
  • forbes.fbe package (+forbes/+fbe/ folder): utility classes for evaluating forward-backward steps and the FBE;
  • forbes.problems package (+forbes/+problems/ folder): classes representing problems;
  • forbes.utils package (+forbes/+utils/ folder): various utilities;
  • forbes.tests package (+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.functions package;
  • move solvers-related code from private/ to a forbes.solvers package.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant