Gadget
conversionindex.h
Go to the documentation of this file.
1 #ifndef conversionindex_h
2 #define conversionindex_h
3 
4 #include "doublevector.h"
5 #include "intvector.h"
6 #include "lengthgroup.h"
7 
13 public:
20  ConversionIndex(const LengthGroupDivision* const L1,
21  const LengthGroupDivision* const L2, int interp = 0);
30  int Error() const { return error; }
35  int minLength() const { return minlength; };
40  int maxLength() const { return maxlength; };
45  int isSameDl() const { return samedl; };
50  int getOffset() const { return offset; };
55  int isFiner() const { return isfiner; };
61  int getPos(int i) const { return pos[i]; };
67  int getNumPos(int i) const { return numpos[i]; };
73  int minPos(int i) const { return minpos[i]; };
79  int maxPos(int i) const { return maxpos[i]; };
85  void interpolateLengths(DoubleVector& Vf, const DoubleVector& Vc);
86 protected:
90  int error;
94  int samedl;
98  int offset;
102  int isfiner;
145 };
146 
147 #endif
This is the class used to convert information from one LengthGroupDivision length structure to a seco...
Definition: conversionindex.h:12
IntVector maxpos
This is the IntVector of maximum index in the finer length group for each coarser length group.
Definition: conversionindex.h:134
int isFiner() const
This function will return the flag denoting whether the target LengthGroupDivision object has a finer...
Definition: conversionindex.h:55
IntVector pos
This is the IntVector of the indices used to convert between the length groups.
Definition: conversionindex.h:119
int minlength
This is the minimum length group that is contained in both LengthGroupDivision objects.
Definition: conversionindex.h:106
int minLength() const
This function will return the minimum length group that is contained in both LengthGroupDivision obje...
Definition: conversionindex.h:35
int minPos(int i) const
This function will return the minimum index in the finer length group for an entry in the coarser len...
Definition: conversionindex.h:73
int Error() const
This function will return the flag denoting whether an error has occured or not.
Definition: conversionindex.h:30
IntVector minpos
This is the IntVector of minimum index in the finer length group for each coarser length group.
Definition: conversionindex.h:129
IntVector numpos
This is the IntVector of the number of finer length groups in each coarser length group.
Definition: conversionindex.h:124
~ConversionIndex()
This is the default ConversionIndex destructor.
Definition: conversionindex.h:25
int isfiner
This is the flag to denote whether the target (L2) LengthGroupDivision object has a finer or coarser ...
Definition: conversionindex.h:102
DoubleVector iratio
This is the DoubleVector of the ratios used when interpolating between the length groups.
Definition: conversionindex.h:139
int getNumPos(int i) const
This function will return the number of finer length groups in the coarser length group for an entry ...
Definition: conversionindex.h:67
ConversionIndex(const LengthGroupDivision *const L1, const LengthGroupDivision *const L2, int interp=0)
This is the ConversionIndex constructor.
Definition: conversionindex.cc:6
int interpolate
This is the flag to denote whether the ConversionIndex will be used to interpolate between the 2 Leng...
Definition: conversionindex.h:114
int error
This is the flag to denote whether an error has occured or not.
Definition: conversionindex.h:90
int getOffset() const
This function will return the offset that specifies the different starting points for 2 LengthGroupDi...
Definition: conversionindex.h:50
int samedl
This is the flag to denote whether the 2 LengthGroupDivision objects have the same length group struc...
Definition: conversionindex.h:94
int maxLength() const
This function will return the maximum length group that is contained in both LengthGroupDivision obje...
Definition: conversionindex.h:40
IntVector ipos
This is the IntVector of the indices used when interpolating between the length groups.
Definition: conversionindex.h:144
int isSameDl() const
This function will return the flag denoting whether the 2 LengthGroupDivision objects have the same l...
Definition: conversionindex.h:45
int offset
This is the difference in the minimum lengths if the 2 LengthGroupDivision objects have the same leng...
Definition: conversionindex.h:98
void interpolateLengths(DoubleVector &Vf, const DoubleVector &Vc)
This function will interpolate values defined for a coarser length division onto a finer length divis...
Definition: conversionindex.cc:145
int maxPos(int i) const
This function will return the maximum index in the finer length group for an entry in the coarser len...
Definition: conversionindex.h:79
int maxlength
This is the maximum length group that is contained in both LengthGroupDivision objects.
Definition: conversionindex.h:110
int getPos(int i) const
This function will return the index in the coarser length group for an entry in the finer length grou...
Definition: conversionindex.h:61
This class implements a dynamic vector of double values.
Definition: doublevector.h:11
This class implements a dynamic vector of int values.
Definition: intvector.h:11
This is the class used to store information about the length groups of the modelled stock population.
Definition: lengthgroup.h:10