Permalink
Browse files

More Doxygen docs for tmb_core.hpp

  • Loading branch information...
1 parent 6295828 commit 05f4da577f9598f77f055f8db5dfee8c3adcc8a2 @skaug skaug committed Dec 1, 2013
Showing with 16 additions and 194 deletions.
  1. +3 −0 TMB/inst/include/convert.hpp
  2. +1 −1 TMB/inst/include/start_parallel.hpp
  3. +11 −4 TMB/inst/include/tmb_core.hpp
  4. +1 −1 dox/Doxyfile
  5. +0 −188 dox/DoxygenLayout.xml
@@ -7,6 +7,8 @@ double asDouble(double x){return x;}
double asDouble(AD<double> x){return CppAD::Value(x);}
double asDouble(AD<AD<double> > x){return CppAD::Value(CppAD::Value(x));}
double asDouble(AD<AD<AD<double> > > x){return CppAD::Value(CppAD::Value(CppAD::Value(x)));}
+
+/** \brief Convert TMB matrix, vector, scalar or int to R style */
template<class Type>
SEXP asSEXP(const matrix<Type> &a)
{
@@ -26,6 +28,7 @@ SEXP asSEXP(const matrix<Type> &a)
UNPROTECT(2);
return val;
}
+
template<class Type>
SEXP asSEXP(const vector<Type> &a)
{
@@ -36,7 +36,7 @@ struct sphess_t{
vector<int> j;
};
-/** \brief R: sphess_t<ADFun<double> > sphess */
+/** \brief sphess_t<ADFun<double> > sphess */
typedef sphess_t<ADFun<double> > sphess;
@@ -337,6 +337,7 @@ class objective_function
from "MakeADFunObject" which tapes the operations and creates the final
ADFun-object.
*/
+ /** \brief Constructor which among other things gives a value to "theta" */
objective_function(SEXP data_, SEXP parameters_, SEXP report_)
{
report=report_;
@@ -360,6 +361,8 @@ class objective_function
max_parallel_regions=-1;
reversefill=false;
}
+
+ /** \brief Extract theta vector from objetive function object */
SEXP defaultpar()
{
int n=theta.size();
@@ -376,6 +379,8 @@ class objective_function
UNPROTECT(2);
return res;
}
+
+ /** \brief Extract parnames vector from objetive function object */
SEXP parNames()
{
int n=parnames.size();
@@ -395,6 +400,7 @@ class objective_function
double value(AD<AD<double> > x){return CppAD::Value(CppAD::Value(x));}
double value(AD<AD<AD<double> > > x){return CppAD::Value(CppAD::Value(CppAD::Value(x)));}
+ /** \brief Find the length of theta, i.e. in application obj=parameters */
int nparms(SEXP obj)
{
int count=0;
@@ -663,7 +669,7 @@ extern "C"
/* Get the default parameter vector (tiny overhead) */
objective_function< AD<double> > F(data,parameters,report);
- F();
+ F(); // Evaluates user template
SEXP par;
PROTECT(par=F.defaultpar());
SEXP res;
@@ -726,6 +732,7 @@ extern "C"
return ans;
}
+ /** \brief Call tape optimization function in CppAD */
SEXP optimizeADFunObject(SEXP f)
{
SEXP tag=R_ExternalPtrTag(f);
@@ -742,7 +749,7 @@ extern "C"
return R_NilValue;
}
- /* Get tag of external pointer */
+ /** \brief Get tag of external pointer */
SEXP getTag(SEXP f){
return R_ExternalPtrTag(f);
}
@@ -815,7 +822,7 @@ extern "C"
return res;
}
- /** \brief Gets parameter order
+ /** \brief Gets parameter order by running the user template
We spend a function evaluation on getting the parameter order (!) */
SEXP getParameterOrder(SEXP data, SEXP parameters, SEXP report)
@@ -831,7 +838,7 @@ extern "C"
return F.parNames();
}
-}
+} /* Double interface */
View
@@ -270,7 +270,7 @@ SUBGROUPING = YES
# be useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
-TYPEDEF_HIDES_STRUCT = NO
+TYPEDEF_HIDES_STRUCT = YES
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
# determine which symbols to keep in memory and which to flush to disk.
View
@@ -1,188 +0,0 @@
-<doxygenlayout version="1.0">
- <!-- Navigation index tabs for HTML output -->
- <navindex>
- <tab type="mainpage" visible="yes" title=""/>
- <tab type="pages" visible="yes" title="" intro=""/>
- <tab type="modules" visible="yes" title="Tutorials" intro=""/>
- <tab type="examples" visible="yes" title="" intro="List of examples:"/>
- <tab type="namespaces" visible="yes" title="">
- <tab type="namespacelist" visible="yes" title="" intro=""/>
- <tab type="namespacemembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="classes" visible="yes" title="">
- <tab type="classlist" visible="yes" title="" intro=""/>
- <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
- <tab type="hierarchy" visible="yes" title="" intro=""/>
- <tab type="classmembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="files" visible="yes" title="">
- <tab type="filelist" visible="yes" title="" intro=""/>
- <tab type="globals" visible="yes" title="" intro=""/>
- </tab>
- <tab type="dirs" visible="yes" title="" intro=""/>
- </navindex>
-
- <!-- Layout definition for a class page -->
- <class>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <inheritancegraph visible="$CLASS_GRAPH"/>
- <collaborationgraph visible="$COLLABORATION_GRAPH"/>
- <allmemberslink visible="yes"/>
- <memberdecl>
- <nestedclasses visible="yes" title=""/>
- <publictypes title=""/>
- <publicslots title=""/>
- <signals title=""/>
- <publicmethods title=""/>
- <publicstaticmethods title=""/>
- <publicattributes title=""/>
- <publicstaticattributes title=""/>
- <protectedtypes title=""/>
- <protectedslots title=""/>
- <protectedmethods title=""/>
- <protectedstaticmethods title=""/>
- <protectedattributes title=""/>
- <protectedstaticattributes title=""/>
- <packagetypes title=""/>
- <packagemethods title=""/>
- <packagestaticmethods title=""/>
- <packageattributes title=""/>
- <packagestaticattributes title=""/>
- <properties title=""/>
- <events title=""/>
- <privatetypes title=""/>
- <privateslots title=""/>
- <privatemethods title=""/>
- <privatestaticmethods title=""/>
- <privateattributes title=""/>
- <privatestaticattributes title=""/>
- <friends title=""/>
- <related title="" subtitle=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <constructors title=""/>
- <functions title=""/>
- <related title=""/>
- <variables title=""/>
- <properties title=""/>
- <events title=""/>
- </memberdef>
- <usedfiles visible="$SHOW_USED_FILES"/>
- <authorsection visible="yes"/>
- </class>
-
- <!-- Layout definition for a namespace page -->
- <namespace>
- <briefdescription visible="yes"/>
- <memberdecl>
- <nestednamespaces visible="yes" title=""/>
- <classes visible="yes" title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </namespace>
-
- <!-- Layout definition for a file page -->
- <file>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <includegraph visible="$INCLUDE_GRAPH"/>
- <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
- <sourcelink visible="yes"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection/>
- </file>
-
- <!-- Layout definition for a group page -->
- <group>
- <briefdescription visible="yes"/>
- <groupgraph visible="$GROUP_GRAPHS"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <dirs visible="yes" title=""/>
- <nestedgroups visible="yes" title=""/>
- <files visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <pagedocs/>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </group>
-
- <!-- Layout definition for a directory page -->
- <directory>
- <briefdescription visible="yes"/>
- <directorygraph visible="yes"/>
- <memberdecl>
- <dirs visible="yes"/>
- <files visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- </directory>
-</doxygenlayout>

0 comments on commit 05f4da5

Please sign in to comment.