19 for(
int i=from+1; i<=to; ++i){
21 for(
int j=from; j<=(i-1); ++j){
40 int whichlevelindex=0;
41 whichlevel(++whichlevelindex)=v(from);
43 for(
int i=from+1; i<=to; ++i){
45 for(
int j=1; j<=whichlevelindex; ++j){
46 if(
fabs(whichlevel(j)-v(i))<eps){
52 whichlevel(++whichlevelindex)=v(i);
55 for(
int j=1; j<=nlevels; ++j){
56 for(
int i=from; i<=to; ++i){
57 if(
fabs(v(i)-whichlevel(j))<eps){
70 for(
int i=from+1; i<=to; ++i){
72 for(
int j=from; j<=(i-1); ++j){
92 cout<<
"Error: par indexmin is not 1 in factor - something is wrong"<<
endl;
97 int whichlevelindex=0;
98 whichlevel(++whichlevelindex)=v(from);
100 for(
int i=from+1; i<=to; ++i){
102 for(
int j=1; j<=whichlevelindex; ++j){
103 if(whichlevel(j)==v(i)){
109 whichlevel(++whichlevelindex)=v(i);
113 for(
int i=from; i<=to; ++i){
114 if(v(i)==whichlevel(j)){
int count_factor(const dvector &v, const double &eps)
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
void allocate(const ivector &v, dvar_vector &par)
df1_two_variable fabs(const df1_two_variable &x)
prnstream & endl(prnstream &)
Array of integers(int) with indexes from index_min to indexmax.
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Support functions for factor.
ivector as_factor(const dvector &v, const double eps)
dvariable operator()(int i)
Fundamental data type for reverse mode automatic differentiation.