*** empty log message ***

This commit is contained in:
jiri
2008-06-17 15:01:37 +00:00
parent f5796068ec
commit 61769dd767
2 changed files with 23 additions and 6 deletions

17
smat.h
View File

@@ -336,6 +336,23 @@ inline T SMat_index_1ilej(T i, T j)
return j*(j-1)/2+i-1;
}
//indexing for antisymmetric matrix (used by fourindex)
template<typename T>
inline T ASMat_index(T i, T j)
{
if(i==j) return -1;
return (i>j) ? i*(i-1)/2+j : j*(j-1)/2+i;
}
template<typename T>
inline T ASMat_index_1(T i, T j)
{
if(i==j) return -1;
return (i>j)? (i-2)*(i-1)/2+j-1 : (j-2)*(j-1)/2+i-1;
}
// access the element, 2-dim array case
template <typename T>