Bug #1062

Fix optimize example

Added by Deil Christoph almost 11 years ago. Updated almost 11 years ago.

Status:ClosedStart date:01/08/2014
Priority:NormalDue date:
Assigned To:Deil Christoph% Done:

100%

Category:-
Target version:00-08-00
Duration:

Description

The optimize example is currently broken:

g++ -o optimize optimize.cpp -I/usr/local/gamma/include/gammalib -L/usr/local/gamma/lib -lgamma
optimize.cpp:76:14: error: variable type 'function' is an abstract class
    function fct;
             ^
/usr/local/gamma/include/gammalib/GOptimizerFunction.hpp:65:28: note: unimplemented pure virtual method 'curvature' in 'function'
    virtual GMatrixSparse* curvature(void) = 0;
                           ^
1 error generated.
make: *** [optimize] Error 1

This example has been copy & pasted into the docs:
http://gammalib.sourceforge.net/user_manual/modules/opt.html#optimizing-a-function

Instead we should use the literalinclude directive to avoid duplication (and sooner or later inconsistencies):
http://sphinx-doc.org/markup/code.html#directive-literalinclude

I’ll fix this now.

Jürgen, can you check on Jenkins that all the examples compile (and maybe run zero exit code)?


Recurrence

No recurrence.

History

#1 Updated by Deil Christoph almost 11 years ago

  • Status changed from In Progress to Pull request

Here’s a fix:
https://github.com/cdeil/gammalib/compare/gammalib:devel...cdeil:issue_1062

I also went through the user manual and improved the formatting of CPP and XML in the user manual.

Looks OK?

#2 Updated by Deil Christoph almost 11 years ago

What is the timescale for the GammaLib 0.8 release?
Do you plan to finish the user manual or is this for 0.9?

Most of the times a class or method is mentioned in the user manual it should actually be a link to the API doxygen docs.
Do we have an issue to write a sphinx directive to cross-link from sphinx to doxygen?

#3 Updated by Knödlseder Jürgen almost 11 years ago

Deil Christoph wrote:

Here’s a fix:
https://github.com/cdeil/gammalib/compare/gammalib:devel...cdeil:issue_1062

I changed this yesterday and forgot to update the example :)

I also went through the user manual and improved the formatting of CPP and XML in the user manual.

Looks OK?

Ok, thanks.

#4 Updated by Knödlseder Jürgen almost 11 years ago

Deil Christoph wrote:

What is the timescale for the GammaLib 0.8 release?
Do you plan to finish the user manual or is this for 0.9?

I would like to get out GammaLib soon, best before the coding sprint. The importance for the 0.8 release is a stabilization of the interfaces, hence method renaming should be finished. Having the documentation complete is less relevant and can wait for the next version.

#5 Updated by Knödlseder Jürgen almost 11 years ago

Deil Christoph wrote:

Most of the times a class or method is mentioned in the user manual it should actually be a link to the API doxygen docs.
Do we have an issue to write a sphinx directive to cross-link from sphinx to doxygen?

No issue so far. Would be nice to have this.

#6 Updated by Knödlseder Jürgen almost 11 years ago

  • Status changed from Pull request to Closed
  • % Done changed from 0 to 100

Pushed into devel.

Also available in: Atom PDF