Formatting
This commit is contained in:
parent
13e477e311
commit
761674415b
2 changed files with 35 additions and 35 deletions
|
@ -47,7 +47,7 @@ inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
|
|||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, eqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(*this, vs, eqOp<Cmpt>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -193,7 +193,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator=
|
|||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, eqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(*this, vs, eqOp<Cmpt>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -203,7 +203,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator+=
|
|||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, plusEqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(*this, vs, plusEqOp<Cmpt>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -213,7 +213,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator-=
|
|||
const VectorSpace<Form, Cmpt, nCmpt>& vs
|
||||
)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, minusEqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(*this, vs, minusEqOp<Cmpt>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -223,7 +223,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator*=
|
|||
const scalar s
|
||||
)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOpS(*this, s, multiplyEqOp2<Cmpt, scalar>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOpS(*this, s, multiplyEqOp2<Cmpt, scalar>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -233,7 +233,7 @@ inline void VectorSpace<Form, Cmpt, nCmpt>::operator/=
|
|||
const scalar s
|
||||
)
|
||||
{
|
||||
VectorSpaceOps<nCmpt,0>::eqOpS(*this, s, divideEqOp2<Cmpt, scalar>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOpS(*this, s, divideEqOp2<Cmpt, scalar>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -308,7 +308,7 @@ inline scalar magSqr
|
|||
)
|
||||
{
|
||||
scalar ms = magSqr(vs.v_[0]);
|
||||
VectorSpaceOps<nCmpt,1>::SeqOp(ms, vs, plusEqMagSqrOp2<scalar, Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 1>::SeqOp(ms, vs, plusEqMagSqrOp2<scalar, Cmpt>());
|
||||
return ms;
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> cmptMultiply
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, cmptMultiplyOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, cmptMultiplyOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -344,7 +344,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> cmptDivide
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, cmptDivideOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, cmptDivideOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ inline VectorSpace<Form, Cmpt, nCmpt> stabilise
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::opVS(v, vs, small, stabiliseOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::opVS(v, vs, small, stabiliseOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ inline Cmpt cmptMax
|
|||
)
|
||||
{
|
||||
Cmpt cMax = vs.v_[0];
|
||||
VectorSpaceOps<nCmpt,1>::SeqOp(cMax, vs, maxEqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 1>::SeqOp(cMax, vs, maxEqOp<Cmpt>());
|
||||
return cMax;
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ inline Cmpt cmptMin
|
|||
)
|
||||
{
|
||||
Cmpt cMin = vs.v_[0];
|
||||
VectorSpaceOps<nCmpt,1>::SeqOp(cMin, vs, minEqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 1>::SeqOp(cMin, vs, minEqOp<Cmpt>());
|
||||
return cMin;
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ inline Cmpt cmptSum
|
|||
)
|
||||
{
|
||||
Cmpt sum = vs.v_[0];
|
||||
VectorSpaceOps<nCmpt,1>::SeqOp(sum, vs, plusEqOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 1>::SeqOp(sum, vs, plusEqOp<Cmpt>());
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,7 @@ inline Form cmptMag
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(v, vs, eqMagOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(v, vs, eqMagOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ inline Form cmptSign
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(v, vs, eqSignOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(v, vs, eqSignOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -471,7 +471,7 @@ inline Form max
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, maxOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, maxOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -484,7 +484,7 @@ inline Form min
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, minOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, minOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -497,7 +497,7 @@ inline Form minMod
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, minModOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, minModOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -540,7 +540,7 @@ inline Form operator-
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::eqOp(v, vs, eqMinusOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::eqOp(v, vs, eqMinusOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -553,7 +553,7 @@ inline Form operator+
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, plusOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, plusOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,7 @@ inline Form operator-
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, minusOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, minusOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ inline Form operator*
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::opSV(v, s, vs, multiplyOp3<Cmpt, scalar, Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::opSV(v, s, vs, multiplyOp3<Cmpt, scalar, Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ inline Form operator*
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::opVS(v, vs, s, multiplyOp3<Cmpt, Cmpt, scalar>());
|
||||
VectorSpaceOps<nCmpt, 0>::opVS(v, vs, s, multiplyOp3<Cmpt, Cmpt, scalar>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ inline Form operator/
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::opVS(v, vs, s, divideOp3<Cmpt, Cmpt, scalar>());
|
||||
VectorSpaceOps<nCmpt, 0>::opVS(v, vs, s, divideOp3<Cmpt, Cmpt, scalar>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -618,7 +618,7 @@ inline Form operator/
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, divideOp<Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::op(v, vs1, vs2, divideOp<Cmpt>());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ inline Form operator/
|
|||
)
|
||||
{
|
||||
Form v;
|
||||
VectorSpaceOps<nCmpt,0>::opSV(v, s, vs, divideOp2<scalar, Cmpt>());
|
||||
VectorSpaceOps<nCmpt, 0>::opSV(v, s, vs, divideOp2<scalar, Cmpt>());
|
||||
return v;
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -4,27 +4,27 @@ class VectorSpaceOps
|
|||
{
|
||||
public:
|
||||
|
||||
static const int endLoop = (I < N-1) ? 1 : 0;
|
||||
static const int endLoop = (I < N - 1) ? 1 : 0;
|
||||
|
||||
template<class V, class S, class EqOp>
|
||||
static inline void eqOpS(V& vs, const S& s, EqOp eo)
|
||||
{
|
||||
eo(vs.v_[I], s);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::eqOpS(vs, s, eo);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::eqOpS(vs, s, eo);
|
||||
}
|
||||
|
||||
template<class S, class V, class EqOp>
|
||||
static inline void SeqOp(S& s, const V& vs, EqOp eo)
|
||||
{
|
||||
eo(s, vs.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::SeqOp(s, vs, eo);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::SeqOp(s, vs, eo);
|
||||
}
|
||||
|
||||
template<class V1, class V2, class EqOp>
|
||||
static inline void eqOp(V1& vs1, const V2& vs2, EqOp eo)
|
||||
{
|
||||
eo(vs1.v_[I], vs2.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::eqOp(vs1, vs2, eo);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::eqOp(vs1, vs2, eo);
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,35 +32,35 @@ public:
|
|||
static inline void opVS(V& vs, const V1& vs1, const S& s, Op o)
|
||||
{
|
||||
vs.v_[I] = o(vs1.v_[I], s);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::opVS(vs, vs1, s, o);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::opVS(vs, vs1, s, o);
|
||||
}
|
||||
|
||||
template<class V, class S, class V1, class Op>
|
||||
static inline void opSV(V& vs, const S& s, const V1& vs1, Op o)
|
||||
{
|
||||
vs.v_[I] = o(s, vs1.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::opSV(vs, s, vs1, o);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::opSV(vs, s, vs1, o);
|
||||
}
|
||||
|
||||
template<class V, class V1, class Op>
|
||||
static inline void op(V& vs, const V1& vs1, const V1& vs2, Op o)
|
||||
{
|
||||
vs.v_[I] = o(vs1.v_[I], vs2.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::op(vs, vs1, vs2, o);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::op(vs, vs1, vs2, o);
|
||||
}
|
||||
|
||||
template<class V, class V1, class V2, class Op>
|
||||
static inline void opVV(V& vs, const V1& vs1, const V2& vs2, Op o)
|
||||
{
|
||||
vs.v_[I] = o(vs1.v_[I], vs2.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::opVV(vs, vs1, vs2, o);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::opVV(vs, vs1, vs2, o);
|
||||
}
|
||||
|
||||
template<class S, class V1, class V2, class EqOp, class Op>
|
||||
static inline void SopEqOpVV(S& s, const V1& vs1, const V2& vs2, EqOp eo, Op o)
|
||||
{
|
||||
eo(s, o(vs1.v_[I], vs2.v_[I]));
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::SopEqOpVV(s, vs1, vs2, eo, o);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I + 1)>::SopEqOpVV(s, vs1, vs2, eo, o);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue