Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Annotation of /trunk/gadget/conversionindex.h
[mareframe] / trunk / gadget / conversionindex.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/conversionindex.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download)

1 : agomez 1 #ifndef conversionindex_h
2 :     #define conversionindex_h
3 :    
4 :     #include "doublevector.h"
5 :     #include "intvector.h"
6 :     #include "lengthgroup.h"
7 : ulcessvp 2 #include "matrix.h"
8 : agomez 1
9 :     /**
10 :     * \class ConversionIndex
11 :     * \brief This is the class used to convert information from one LengthGroupDivision length structure to a second LengthGroupDivision length structure
12 :     */
13 :     class ConversionIndex {
14 :     public:
15 :     /**
16 :     * \brief This is the ConversionIndex constructor
17 :     * \param L1 is the first LengthGroupDivision
18 :     * \param L2 is the second LengthGroupDivision
19 :     * \param interp is the flag to denote whether the ConversionIndex will be used to interpolate between the 2 LengthGroupDivision objects (default value 0)
20 :     */
21 :     ConversionIndex(const LengthGroupDivision* const L1,
22 :     const LengthGroupDivision* const L2, int interp = 0);
23 :     /**
24 :     * \brief This is the default ConversionIndex destructor
25 :     */
26 :     ~ConversionIndex() {};
27 :     /**
28 :     * \brief This function will return the flag denoting whether an error has occured or not
29 :     * \return error
30 :     */
31 :     int Error() const { return error; }
32 :     /**
33 :     * \brief This function will return the minimum length group that is contained in both LengthGroupDivision objects
34 :     * \return minlength
35 :     */
36 :     int minLength() const { return minlength; };
37 :     /**
38 :     * \brief This function will return the maximum length group that is contained in both LengthGroupDivision objects
39 :     * \return maxlength
40 :     */
41 :     int maxLength() const { return maxlength; };
42 :     /**
43 :     * \brief This function will return the flag denoting whether the 2 LengthGroupDivision objects have the same length group structure or not
44 :     * \return samedl
45 :     */
46 :     int isSameDl() const { return samedl; };
47 :     /**
48 :     * \brief This function will return the offset that specifies the different starting points for 2 LengthGroupDivision objects that have the same length group structure
49 :     * \return offset
50 :     */
51 :     int getOffset() const { return offset; };
52 :     /**
53 :     * \brief This function will return the flag denoting whether the target LengthGroupDivision object has a finer length group structure or not
54 :     * \return isfiner
55 :     */
56 :     int isFiner() const { return isfiner; };
57 :     /**
58 :     * \brief This function will return the index in the coarser length group for an entry in the finer length group
59 :     * \param i is the index in the finer length group
60 :     * \return pos for finer length group i
61 :     */
62 :     int getPos(int i) const { return pos[i]; };
63 :     /**
64 :     * \brief This function will return the number of finer length groups in the coarser length group for an entry in the finer length group
65 :     * \param i is the index in the finer length group
66 :     * \return numpos for finer length group i
67 :     */
68 :     int getNumPos(int i) const { return numpos[i]; };
69 :     /**
70 :     * \brief This function will return the minimum index in the finer length group for an entry in the coarser length group
71 :     * \param i is the index in the coarser length group
72 :     * \return minpos for coarser length group i
73 :     */
74 :     int minPos(int i) const { return minpos[i]; };
75 :     /**
76 :     * \brief This function will return the maximum index in the finer length group for an entry in the coarser length group
77 :     * \param i is the index in the coarser length group
78 :     * \return maxpos for coarser length group i
79 :     */
80 :     int maxPos(int i) const { return maxpos[i]; };
81 :     /**
82 :     * \brief This function will interpolate values defined for a coarser length division onto a finer length division
83 :     * \param Vf is the DoubleVector that will contain the finer values after the interpolation
84 :     * \param Vc is the DoubleVector of the coarser values to interpolate from
85 :     */
86 :     void interpolateLengths(DoubleVector& Vf, const DoubleVector& Vc);
87 : ulcessvp 2 void interpolateLengths(DoubleVector& Vf, const double* Vc, int size);
88 : agomez 1 protected:
89 :     /**
90 :     * \brief This is the flag to denote whether an error has occured or not
91 :     */
92 :     int error;
93 :     /**
94 :     * \brief This is the flag to denote whether the 2 LengthGroupDivision objects have the same length group structure
95 :     */
96 :     int samedl;
97 :     /**
98 :     * \brief This is the difference in the minimum lengths if the 2 LengthGroupDivision objects have the same length group structure
99 :     */
100 :     int offset;
101 :     /**
102 :     * \brief This is the flag to denote whether the target (L2) LengthGroupDivision object has a finer or coarser length group structure
103 :     */
104 :     int isfiner;
105 :     /**
106 :     * \brief This is the minimum length group that is contained in both LengthGroupDivision objects
107 :     */
108 :     int minlength;
109 :     /**
110 :     * \brief This is the maximum length group that is contained in both LengthGroupDivision objects
111 :     */
112 :     int maxlength;
113 :     /**
114 :     * \brief This is the flag to denote whether the ConversionIndex will be used to interpolate between the 2 LengthGroupDivision objects
115 :     */
116 :     int interpolate;
117 :     /**
118 :     * \brief This is the IntVector of the indices used to convert between the length groups
119 :     * \note This vector is resized to be the same length as the finer LengthGroupDivision object
120 :     */
121 :     IntVector pos;
122 :     /**
123 :     * \brief This is the IntVector of the number of finer length groups in each coarser length group
124 :     * \note This vector is resized to be the same length as the finer LengthGroupDivision object and is only used if the isfiner flag has been set
125 :     */
126 :     IntVector numpos;
127 :     /**
128 :     * \brief This is the IntVector of minimum index in the finer length group for each coarser length group
129 :     * \note This vector is resized to be the same length as the coarser LengthGroupDivision object
130 :     */
131 :     IntVector minpos;
132 :     /**
133 :     * \brief This is the IntVector of maximum index in the finer length group for each coarser length group
134 :     * \note This vector is resized to be the same length as the coarser LengthGroupDivision object
135 :     */
136 :     IntVector maxpos;
137 :     /**
138 :     * \brief This is the DoubleVector of the ratios used when interpolating between the length groups
139 :     * \note This vector is resized to be the same length as the finer LengthGroupDivision object and is only used if the interpolate flag has been set
140 :     */
141 :     DoubleVector iratio;
142 :     /**
143 :     * \brief This is the IntVector of the indices used when interpolating between the length groups
144 :     * \note This vector is resized to be the same length as the finer LengthGroupDivision object and is only used if the interpolate flag has been set
145 :     */
146 :     IntVector ipos;
147 :     };
148 :    
149 :     #endif

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge