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

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

Powered By FusionForge