Statistiques
| Révision :

root / www / HPL_dlange.html

Historique | Voir | Annoter | Télécharger (2,34 ko)

1
<HTML>
2
<HEAD>
3
<TITLE>HPL_dlange HPL 2.0 Library Functions September 10, 2008</TITLE> 
4
</HEAD>
5

    
6
<BODY BGCOLOR="WHITE" TEXT = "#000000" LINK = "#0000ff" VLINK = "#000099"
7
      ALINK = "#ffff00">
8

    
9
<H1>Name</H1>
10
<B>HPL_dlange</B> Compute ||A||.
11

    
12
<H1>Synopsis</H1>
13
<CODE>#include "hpl.h"</CODE><BR><BR>
14
<CODE>double</CODE>
15
<CODE>HPL_dlange(</CODE>
16
<CODE>const HPL_T_NORM</CODE>
17
<CODE>NORM</CODE>,
18
<CODE>const int</CODE>
19
<CODE>M</CODE>,
20
<CODE>const int</CODE>
21
<CODE>N</CODE>,
22
<CODE>const double *</CODE>
23
<CODE>A</CODE>,
24
<CODE>const int</CODE>
25
<CODE>LDA</CODE>
26
<CODE>);</CODE>
27

    
28
<H1>Description</H1>
29
<B>HPL_dlange</B>
30
returns  the value of the one norm,  or the infinity norm,
31
or the element of largest absolute value of a matrix A:              
32
 
33
   max(abs(A(i,j))) when NORM = HPL_NORM_A,                          
34
   norm1(A),        when NORM = HPL_NORM_1,                          
35
   normI(A),        when NORM = HPL_NORM_I,                          
36
 
37
where norm1 denotes the one norm of a matrix (maximum column sum) and
38
normI denotes  the infinity norm of a matrix (maximum row sum).  Note
39
that max(abs(A(i,j))) is not a matrix norm.
40

    
41
<H1>Arguments</H1>
42
<PRE>
43
NORM    (local input)                 const HPL_T_NORM
44
        On entry,  NORM  specifies  the  value to be returned by this
45
        function as described above.
46
</PRE>
47
<PRE>
48
M       (local input)                 const int
49
        On entry,  M  specifies  the number  of rows of the matrix A.
50
        M must be at least zero.
51
</PRE>
52
<PRE>
53
N       (local input)                 const int
54
        On entry,  N specifies the number of columns of the matrix A.
55
        N must be at least zero.
56
</PRE>
57
<PRE>
58
A       (local input)                 const double *
59
        On entry,  A  points to an  array of dimension  (LDA,N), that
60
        contains the matrix A.
61
</PRE>
62
<PRE>
63
LDA     (local input)                 const int
64
        On entry, LDA specifies the leading dimension of the array A.
65
        LDA must be at least max(1,M).
66
</PRE>
67

    
68
<H1>Example</H1>
69
<CODE>#include "hpl.h"</CODE><BR><BR>
70
<PRE>
71
int main(int argc, char *argv[])
72
{
73
   double a[2*2];
74
   a[0] = 1.0; a[1] = 3.0; a[2] = 2.0; a[3] = 4.0;
75
   norm = HPL_dlange( HPL_NORM_I, 2, 2, a, 2 );
76
   printf("norm=%f\n", norm);
77
   exit(0); return(0);
78
}
79
</PRE>
80

    
81
<H1>See Also</H1>
82
<A HREF="HPL_dlaprnt.html">HPL_dlaprnt</A>,
83
<A HREF="HPL_fprintf.html">HPL_fprintf</A>.
84

    
85
</BODY>
86
</HTML>