ENH: Add static identity members to primitive types

This commit is contained in:
laurence
2012-12-11 16:50:53 +00:00
parent 93cf312826
commit af1d8bf357
6 changed files with 26 additions and 0 deletions

View File

@ -79,6 +79,7 @@ public:
static const SymmTensor one;
static const SymmTensor max;
static const SymmTensor min;
static const SymmTensor I;
//- Component labeling enumeration

View File

@ -75,6 +75,14 @@ const symmTensor symmTensor::min
-VGREAT
);
template<>
const symmTensor symmTensor::I
(
1, 0, 0,
1, 0,
1
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -82,6 +82,7 @@ public:
static const Tensor one;
static const Tensor max;
static const Tensor min;
static const Tensor I;
//- Component labeling enumeration

View File

@ -76,6 +76,14 @@ const tensor tensor::min
-VGREAT, -VGREAT, -VGREAT
);
template<>
const tensor tensor::I
(
1, 0, 0,
0, 1, 0,
0, 0, 1
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -75,6 +75,7 @@ public:
static const Tensor2D one;
static const Tensor2D max;
static const Tensor2D min;
static const Tensor2D I;
//- Component labeling enumeration

View File

@ -70,6 +70,13 @@ const tensor2D tensor2D::min
-VGREAT, -VGREAT
);
template<>
const tensor2D tensor2D::I
(
1, 0,
0, 1
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //