~mwshinn/+junk/neural

« back to all changes in this revision

Viewing changes to src/concavity.c

  • Committer: Max Shinn
  • Date: 2012-11-22 22:50:42 UTC
  • Revision ID: trombonechamp@gmail.com-20121122225042-gxcmjuh4lt3qp242
Noise and the population/organisms bug.  Also, documented neural.c in notes format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
      nsynapses++;
60
60
 
61
61
  // Read the input from stdin, stopping at the newline character or EOF
62
 
  #define MAXLINE 1024 // No more than 1024 chars on a line
 
62
  #define MAXLINE 1024*1024 // No more than 1024*1024 chars on a line
63
63
  char c;
64
64
  char *ch;
65
65
  char buff[MAXLINE];
96
96
    Matrix* hessian = MatCreate(nsynapses, nsynapses);
97
97
    hessian->n = 0;
98
98
    createHessian(coordinates, nsynapses, hessian);
99
 
    MatDisplay(hessian, "Hessian");
 
99
    //MatDisplay(hessian, "Hessian");
100
100
 
101
101
  }
102
102
  return 0;
136
136
    // Now calculate the Hessian value and store it
137
137
    real hessval = (fiplus + fiminus - 2*fi)/(2*_H*_H);
138
138
    MatStore(hess, i, i, hessval, TRUE);
139
 
    printf("Stored value %i,%i\n", i, i);
 
139
    //printf("Stored value %i,%i\n", i, i);
140
140
    printf("First derivative is: %.8f", (fiplus-fiminus)/(2*_H));
141
141
  }
142
142
  // Now, non-diagonals
204
204
  OrgEval(o);
205
205
 
206
206
  fitness = o->dist;
207
 
  printf("Fitness is %f", fitness);
 
207
  //printf("Fitness is %f", fitness);
208
208
  OrgDestroy(o);
209
209
  return fitness;
210
210
}