NAG CL Interface
x04dac is an easy-to-use function to print a Complex matrix.
||x04dac (Nag_OrderType order,
const Complex a,
const char *title,
const char *outfile,
The function may be called by the names: x04dac, nag_file_print_matrix_complex_gen or nag_gen_complx_mat_print.
prints a Complex matrix. It is an easy-to-use driver for x04dbc
. The function uses default values for the format in which numbers are printed, for labelling the rows and columns, and for output record length.
x04dac will choose a format code such that numbers will be printed with
a , a or a format.
code is chosen if the sizes of all the matrix elements to be printed lie between and . The
code is chosen if the sizes of all the matrix elements to be printed lie between and . Otherwise the
code is chosen. The chosen code is used to print each complex element of the matrix with the real part above the imaginary part.
The matrix is printed with integer row and column labels, and with a maximum record length of .
The matrix is output to the file specified by outfile
by default, to standard output.
: the order
argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by
. See Section 3.1.3
in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
: indicates the part of the matrix to be printed.
- The whole of the rectangular matrix.
- The lower triangle of the matrix, or the lower trapezium if the matrix has more rows than columns.
- The upper triangle of the matrix, or the upper trapezium if the matrix has more columns than rows.
, or .
: indicates whether the diagonal elements of the matrix are to be printed.
- The diagonal elements of the matrix are not referenced and not printed.
- The diagonal elements of the matrix are not referenced, but are assumed all to be unity, and are printed as such.
- The diagonal elements of the matrix are referenced and printed.
, then diag
must be set to
- if , , or ;
- if , .
: the number of rows and columns of the matrix, respectively, to be printed.
If either m
is less than
will exit immediately after printing title
; no row or column labels are printed.
– const Complex
the dimension, dim
, of the array a
must be at least
th element of the matrix
is stored in
- when ;
- when .
: the matrix to be printed. Only the elements that will be referred to, as specified by arguments matrix
, need be set.
: the stride separating row or column elements (depending on the value of order
) in the array a
- if ,
- if , .
– const char *
: a title to be printed above the matrix.
If , no title (and no blank line) will be printed.
contains more than
characters, the contents of title
will be wrapped onto more than one line, with the break after
Any trailing blank characters in title
– const char *
: the name of a file to which output will be directed. If outfile
the output will be directed to standard output.
– NagError *
The NAG error argument (see Section 7
in the Introduction to the NAG Library CL Interface).
Error Indicators and Warnings
Memory allocation failed.
On entry, argument had an illegal value.
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG
Cannot open file for appending.
Cannot close file .
Cannot open file for writing.
Parallelism and Performance
x04dac is not threaded in any implementation.
A call to x04dac
is equivalent to a call to x04dbc
with the following argument values:
ncols = 80
indent = 0
labrow = Nag_IntegerLabels
labcol = Nag_IntegerLabels
form = 0
cmplxform = Nag_AboveForm
This example program calls x04dac twice, first to print a by rectangular matrix, and then to print a by lower triangular matrix.