Revision 1258 trunk/src/df1b2-separable/df1b2impspf.cpp

df1b2impspf.cpp (revision 1258)
53 53
  // do we need this next line?
54 54
  y(1,xs)=x;
55 55

  
56
  int i,j;
57 56
  dvar_vector d(1,xs+us);
58 57

  
59 58
  // contribution for quadratic prior
......
66 65
 // Here need hooks for sparse matrix structures
67 66

  
68 67
  int ii=xs+us+1;
69
  for (i=smin;i<=smax;i++)
68
  for (int i=smin;i<=smax;i++)
70 69
    y(ii++)=lst(i);
71 70

  
72 71
  dvar_vector vy=dvar_vector(y);
......
94 93
      pmin->lapprox->vsparse_triplet=
95 94
        new dvar_compressed_triplet(mmin,mmax,us,us);
96 95
      vsparse_triplet = pmin->lapprox->vsparse_triplet;
97
      for (i=mmin;i<=mmax;i++)
96
      for (int i=mmin;i<=mmax;i++)
98 97
      {
99 98
        (*vsparse_triplet)(1,i)=lst(1,i);
100 99
        (*vsparse_triplet)(2,i)=lst(2,i);
......
105 104
      if (!allocated(*vsparse_triplet))
106 105
      {
107 106
        (*vsparse_triplet).allocate(mmin,mmax,us,us);
108
        for (i=mmin;i<=mmax;i++)
107
        for (int i=mmin;i<=mmax;i++)
109 108
        {
110 109
          (*vsparse_triplet)(1,i)=lst(1,i);
111 110
          (*vsparse_triplet)(2,i)=lst(2,i);
......
120 119
      pmin->lapprox->vsparse_triplet_adjoint=
121 120
        new dcompressed_triplet(mmin,mmax,us,us);
122 121
      vsparse_triplet_adjoint = pmin->lapprox->vsparse_triplet_adjoint;
123
      for (i=mmin;i<=mmax;i++)
122
      for (int i=mmin;i<=mmax;i++)
124 123
      {
125 124
        (*vsparse_triplet_adjoint)(1,i)=lst(1,i);
126 125
        (*vsparse_triplet_adjoint)(2,i)=lst(2,i);
......
131 130
      if (!allocated(*vsparse_triplet_adjoint))
132 131
      {
133 132
        (*vsparse_triplet_adjoint).allocate(mmin,mmax,us,us);
134
        for (i=mmin;i<=mmax;i++)
133
        for (int i=mmin;i<=mmax;i++)
135 134
        {
136 135
          (*vsparse_triplet_adjoint)(1,i)=lst(1,i);
137 136
          (*vsparse_triplet_adjoint)(2,i)=lst(2,i);
......
297 296
   gradient_structure::set_YES_DERIVATIVES();
298 297

  
299 298
  ii=1;
300
  for (i=1;i<=xs;i++)
299
  for (int i=1;i<=xs;i++)
301 300
    xadjoint(i)=g(ii++);
302
  for (i=1;i<=us;i++)
301
  for (int i=1;i<=us;i++)
303 302
    uadjoint(i)=g(ii++);
304 303

  
305 304
  dcompressed_triplet * vsparse_triplet_adjoint =

Also available in: Unified diff