5 #ifndef _KSCONNECTIVITY_H_
6 #define _KSCONNECTIVITY_H_
62 void addSelf(
const int i,
const int j,
const T val)
64 void addOther(
const int i,
const int j,
const T val)
88 for(
int i=0;i<Arows;i++)
90 for(
int pos=row[i];pos<row[i+1];pos++)
96 throw CException(
"Matrix size does not agree with vectors!");
105 for(
int i=0;i<Arows;i++)
109 for(
int pos=row[i];pos<row[i+1];pos++)
115 throw CException(
"Matrix size does not agree with vectors!");
127 for(
int i=0;i<Arows;i++)
132 for(
int i=0;i<Arows;i++)
137 for(
int pos=row[i];pos<row[i+1];pos++)
139 const T fromCoeff=coeff[pos];
140 const int j=col[pos];
150 for(
int i=0;i<Arows;i++)
155 for(
int i=0;i<Arows;i++)
160 for(
int pos=row[i];pos<row[i+1];pos++)
162 const T fromCoeff=coeff[pos];
163 const int j=col[pos];
193 for(
int i=0;i<selfSize;i++)
204 for(
int j=0;j<selfSize;j++)
206 if(
fabs(myExpand[j])>0.)
214 for(
int i=0;i<selfSize;i++)
224 for(
int j=0;j<selfSize;j++)
226 if(
fabs(myExpand[j])>0.)
234 throw CException(
"addToSelf: Rows not the same size!");
248 for(
int i=0;i<selfSize;i++)
261 if(
fabs(myExpand[j])>0.)
269 for(
int i=0;i<selfSize;i++)
281 if(
fabs(myExpand[j])>0.)
288 throw CException(
"addToOther: Columns not the same size!");
291 throw CException(
"addToOther: Rows not the same size!");
302 for(
int pos=row[i];pos<row[i+1];pos++)
304 const int j=col[pos];
318 for(
int pos=row[i];pos<row[i+1];pos++)
320 const int j=col[pos];
const Array< int > & getCol() const
int getCount(const int i) const
void multiplySelf(const T x)
const Array< int > & getRow() const
void addCountOther(const int index, const int count)
vector< CouplingPair * > SelfToOther
void multiplyOther(const T x)
const TArray & getSelfCoeffs()
void addSelf(const int i, const int j, const T val)
TArray _SelfToOtherCoeffs
CRConnectivity _SelfToOtherConn
KSConnectivity(const int selfLength, const int otherLength)
vector< CouplingPair * > SelfToSelf
const IntArray & getOtherRow()
pair< IntArray *, TArray * > CouplingPair
CRConnectivity _SelfToSelfConn
void addCountSelf(const int index, const int count)
void copyFrom(KSConnectivity &from)
const IntArray & getOtherCol()
void multiplyOther(const TArray &x, TArray &b, const T scale) const
void resize(const int newLength)
const IntArray & getSelfCol()
int getOtherCount(const int i)
void addToOther(KSConnectivity &added)
Tangent fabs(const Tangent &a)
int add(const int index, const int val)
int getSelfCount(const int i)
void multiplySelf(const TArray &x, TArray &b, const T scale) const
TArray & getNonConstOtherCoeffs()
void addOther(const int i, const int j, const T val)
void expandMySelfSelf(const int i, TArray &ExpCoeff)
void addCount(const int index, const int count)
const TArray & getOtherCoeffs()
void addToSelf(KSConnectivity &added)
const IntArray & getSelfRow()
void expandMySelfOther(const int i, TArray &ExpCoeff)