Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non templated problem #97

Closed
wants to merge 14 commits into from

Conversation

fdarricau
Copy link
Contributor

Work in progress:

  • First step: the type-checking system
    • setting the flags
    • creating the architecture of methods needed to provide a runtime typing comparison
    • writing tests
  • Last step: Problem<EigenMatrixDense/Sparse>
    • Revamping problem.h* and solver.h*
    • adapting their tests

Once over, every plugin and dependent modules will have to be updated accordingly

}

/// \brief Flag representing the Roboptim Function type
static const unsigned long flag_;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a trailing underscore for static parameters, since you call it in a public way, e.g. GenericDifferentiableFunction<T>::flag_.

@fdarricau
Copy link
Contributor Author

Ok so now that the Problem and Solver classes are rewritten, we will probably have to provide an "automatic_cast" that uses the flag system to retrieve the actual function.
We could even rewrite the cast_into so that it automatically gives the last one.

Three tests fail, and it is basically because we can't check the constraint type as before. So something able to retrieve the actual function type would solve it.

@bchretien
Copy link
Member

Another idea for the enum: to prevent clashes, we can also wrap it in a struct, cf. what I did there.

Also, this PR should not be on master since this is a huge API change. This should be on a separate branch until we give the all clear.

@fdarricau
Copy link
Contributor Author

Indeed, it would be cleaner to base the PR on a related branch, but none of the active branches is really related to it (and many of them are quite old, so the merge process might be complicated)
Can you create one ? Then I will move it there

@bchretien
Copy link
Member

I guess we can create a dev or v4.0 branch.

@fdarricau
Copy link
Contributor Author

Moving this to a new PR

@fdarricau fdarricau closed this Jun 30, 2015
@fdarricau fdarricau mentioned this pull request Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants