Revision 1572 trunk/src/linad99/cmpdif9.cpp

cmpdif9.cpp (revision 1572)
15 15
#endif
16 16

  
17 17
/**
18
 * Description not yet available.
19
 * \param
20
 */
18
Saves the size, address, and value information for a imatrix.
19
*/
21 20
void imatrix::save_imatrix_value(void)
22 21
{
23
  // saves the size, address, and value information for a imatrix
24
  //int ierr;
25 22
  for (int i=rowmin();i<=rowmax();i++)
26 23
  {
27 24
    ((*this)(i).save_ivector_value());
28 25
    ((*this)(i).save_ivector_position());
29 26
  }
30 27
}
31

  
32 28
/**
33
 * Description not yet available.
34
 * \param
35
 */
29
Saves the size and address information for a imatrix.
30
*/
36 31
void imatrix::save_imatrix_position(void)
37 32
{
38
  // saves the size and address information for a ivector
39 33
  imatrix_position tmp(*this);
40 34
  const int wsize=sizeof(int);
41 35
  const int wsize1=sizeof(void*);
......
47 41
    gradient_structure::get_fp()->fwrite(&(tmp.lb(i)),wsize);
48 42
    gradient_structure::get_fp()->fwrite(&(tmp.ub(i)),wsize);
49 43
    gradient_structure::get_fp()->fwrite(&(tmp.ptr(i)),wsize1);
50
   }
44
  }
51 45
  gradient_structure::get_fp()->fwrite(&(tmp.row_min),wsize);
52 46
  gradient_structure::get_fp()->fwrite(&(tmp.row_max),wsize);
53 47
}
54

  
55 48
/**
56
 * Description not yet available.
57
 * \param
58
 */
49
Reads and restores back the size and address information for a imatrix.
50
*/
59 51
imatrix_position restore_imatrix_position(void)
60 52
{
61
  // reads back the size and address information for a imatrix
62
  // restores the size, address, and value information for a ivector
63 53
  int min;
64 54
  int max;
65 55
  gradient_structure::get_fp()->fread(&max,sizeof(int));
66 56
  gradient_structure::get_fp()->fread(&min,sizeof(int));
67 57
  imatrix_position tmp(min,max);
68
  // cout << "tmp.ptr= " << tmp.ptr ;
69 58
  for (int i=max;i>=min;i--)
70 59
  {
71 60
    gradient_structure::get_fp()->fread(&(tmp.ptr(i)),sizeof(void*));
......
74 63
  }
75 64
  return tmp;
76 65
}
77

  
78 66
/**
79 67
 * Description not yet available.
80 68
 * \param
......
84 72
  // restores the size, address, and value information for a dvar_matrix
85 73
  //  the size, address, and value information for a dvar_matrix
86 74
  imatrix out(mpos);
87
  //int ierr;
88 75
  int min=out.rowmin();
89 76
  int max=out.rowmax();
90 77
  for (int i=max;i>=min;i--)

Also available in: Unified diff