Download this file
26 lines (24 with data), 557 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | //=============================================================================
template<long n>
inline void idamax(long& I, long& J, const dsymatrix_small<n>& A)
{
double max(-1.);
for(int i=0; i<n; i++){
for(int j=0; j<=i; j++){
if( max<fabs(A(i,j)) ){
I=i;
J=j;
max =fabs(A(i,j));
}
}
}
return;
}
//=============================================================================
template<long n>
inline double damax(const dsymatrix_small<n>& A)
{
long i(0),j(0);
idamax(i,j,A);
return A(i,j);
}
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.