ClpParameters.hpp
Go to the documentation of this file.
1 /* $Id: ClpParameters.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2000, 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 
5 #ifndef _ClpParameters_H
6 #define _ClpParameters_H
7 
40 };
41 
67 };
68 
69 
77 };
78 
80 template <class T> inline void
81 ClpDisjointCopyN( const T * array, const int size, T * newArray)
82 {
83  memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
84 }
86 template <class T> inline void
87 ClpFillN( T * array, const int size, T value)
88 {
89  int i;
90  for (i = 0; i < size; i++)
91  array[i] = value;
92 }
94 template <class T> inline T*
95 ClpCopyOfArray( const T * array, const int size, T value)
96 {
97  T * arrayNew = new T[size];
98  if (array)
99  ClpDisjointCopyN(array, size, arrayNew);
100  else
101  ClpFillN ( arrayNew, size, value);
102  return arrayNew;
103 }
104 
106 template <class T> inline T*
107 ClpCopyOfArray( const T * array, const int size)
108 {
109  if (array) {
110  T * arrayNew = new T[size];
111  ClpDisjointCopyN(array, size, arrayNew);
112  return arrayNew;
113  } else {
114  return NULL;
115  }
116 }
118 typedef struct {
119  int typeStruct; // allocated as 1,2 etc
120  int typeCall;
121  void * data;
123 #endif