Skip to content

Handing multiple definitions of operator<< by inline-ing#1

Open
jackbergus wants to merge 2 commits intodroemer7:masterfrom
jackbergus:master
Open

Handing multiple definitions of operator<< by inline-ing#1
jackbergus wants to merge 2 commits intodroemer7:masterfrom
jackbergus:master

Conversation

@jackbergus
Copy link

@jackbergus jackbergus commented Oct 2, 2024

The definition of operator<< in the header files is required to be inlined, as you might otherwise get multiple definitions of the same function across your final binary.

@jackbergus jackbergus changed the title Correctly dealing at compile time Handing multiple definitions of operator<< by inline-ing Oct 2, 2024
### Constrained Minimization

With our objective function `Rosenbrock` defined above, we can now use this to setup our problem and perform the minimization. In the example below, given the constraints `l` and `u` the correct solution is `f(x) = 7.75` at `[0.5, 0.5, 0.35]`, not `[1, 1, 1]` as it is for the unconstrained Rosenbrock problem.
With our objective function `WODT` defined above, we can now use this to setup our problem and perform the minimization. In the example below, given the constraints `l` and `u` the correct solution is `f(x) = 7.75` at `[0.5, 0.5, 0.35]`, not `[1, 1, 1]` as it is for the unconstrained WODT problem.
Copy link
Owner

Choose a reason for hiding this comment

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

Just getting around to look at this now. I dont think this change should be included.

int main()
{
Rosenbrock f; // Objective function we wish to minimize
WODT f; // Objective function we wish to minimize
Copy link
Owner

Choose a reason for hiding this comment

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

Same here.

int main()
{
Rosenbrock f; // Objective function we wish to minimize
WODT f; // Objective function we wish to minimize
Copy link
Owner

Choose a reason for hiding this comment

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

And here.

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.

2 participants