*** empty log message ***
This commit is contained in:
parent
5488183118
commit
c96c96ba08
4
smat.h
4
smat.h
@ -280,13 +280,13 @@ inline const T & NRSMat<T>::operator[](const int ij) const
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
inline T SMat_index(T i, T j)
|
inline T SMat_index(T i, T j)
|
||||||
{
|
{
|
||||||
return i>=j ? i*(i+1)/2+j : j*(j+1)/2+i;
|
return (i>=j) ? i*(i+1)/2+j : j*(j+1)/2+i;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline T SMat_index_1(T i, T j)
|
inline T SMat_index_1(T i, T j)
|
||||||
{
|
{
|
||||||
return i>j? i*(i-1)/2+j-1 : j*(j-1)/2+i-1;
|
return (i>=j)? i*(i-1)/2+j-1 : j*(j-1)/2+i-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// access the element, 2-dim array case
|
// access the element, 2-dim array case
|
||||||
|
Loading…
Reference in New Issue
Block a user