Files Classes Functions Hierarchy
#include <typedefs.h>
Go to the source code of this file.
Classes | |
| class | sequencesequal3helper< INDX, I0, I1, I2 > |
Functions | |
| template<typename INDX > | |
| boolc | sequencesequal3 (INDX const *va, INDX const *vb) |
| Given two vectors of length 3, do they have the same elements in number and type independent of their order. | |
| boolc sequencesequal3 | ( | INDX const * | va, | |
| INDX const * | vb | |||
| ) | [inline] |
Given two vectors of length 3, do they have the same elements in number and type independent of their order.
eg (2,1,1) is the same as (1,1,2).
Definition at line 58 of file sequencesequal.h.
Referenced by simplexD2indexed< INDX >::operator==().
00059 { 00060 00061 if (sequencesequal3helper<INDX,0,1,2>().eval(va,vb)==true) 00062 return true; 00063 00064 if (sequencesequal3helper<INDX,2,1,0>().eval(va,vb)==true) 00065 return true; 00066 00067 if (sequencesequal3helper<INDX,1,0,2>().eval(va,vb)==true) 00068 return true; 00069 00070 return false; 00071 00072 /* 00073 00074 if (va[0]==vb[0]) 00075 { 00076 if (va[1]==vb[1]) 00077 { 00078 if (va[2]==vb[2]) 00079 return true; 00080 00081 return false; 00082 } 00083 00084 if (va[1]==vb[2]) 00085 { 00086 if (va[2]==vb[1]) 00087 return true; 00088 00089 return false; 00090 } 00091 00092 return false; 00093 } 00094 00095 00096 if (va[1]==vb[0]) 00097 { 00098 if (va[0]==vb[1]) 00099 { 00100 if (va[2]==vb[2]) 00101 return true; 00102 00103 return false; 00104 } 00105 00106 if (va[0]==vb[2]) 00107 { 00108 if (va[2]==vb[1]) 00109 return true; 00110 00111 return false; 00112 } 00113 00114 return false; 00115 } 00116 00117 00118 if (va[2]==vb[0]) 00119 { 00120 if (va[1]==vb[1]) 00121 { 00122 if (va[0]==vb[2]) 00123 return true; 00124 00125 return false; 00126 } 00127 00128 if (va[1]==vb[2]) 00129 { 00130 if (va[0]==vb[1]) 00131 return true; 00132 00133 return false; 00134 } 00135 00136 return false; 00137 } 00138 00139 return false; 00140 */ 00141 00142 }
1.5.8