|
NAG[g05qac] NAG[nag_rngs_orthog_matrix] - Computes a random orthogonal matrix
|
|
Calling Sequence
g05qac(side, init, m, n, a, igen, iseed, 'fail'=fail)
nag_rngs_orthog_matrix(. . .)
Parameters
|
init - String;
|
|
|
On entry: indicates whether or not a should be initialized to the identity matrix.
|
|
a is initialized to the identity matrix.
|
|
a is not initialized and the matrix must be supplied in a.
|
|
Constraint: "Nag_InitializeI" or "Nag_InputA". .
|
|
|
m - integer;
|
|
|
On entry: , the number of rows of the matrix .
|
|
if , ;
|
|
otherwise.
|
|
|
n - integer;
|
|
|
On entry: , the number of columns of the matrix .
|
|
if , ;
|
|
otherwise.
|
|
|
a - Matrix(1..dim1, 1..n, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On entry: if , a must contain the matrix .
|
|
|
iseed - Vector(1.. , datatype=integer[kernelopts('wordsize')/8]);
|
|
|
On entry: contains values which define the current state of the selected generator.
|
|
On exit: contains updated values defining the new state of the selected generator.
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_rngs_orthog_matrix (g05qac) generates a random orthogonal matrix.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_ENUM_INT"
On entry, , . Constraint: if , .
On entry, , . Constraint: if , .
On entry, , . Constraint: if , .
On entry, , . Constraint: if , .
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_ORTHOGONAL_MATRIX"
Orthogonal matrix of dimension 1 requested.
|
|
Accuracy
|
|
The maximum error in should be a modest multiple of machine precision (see Chapter x02).
|
|
|
Examples
|
|
>
|
side := "Nag_RightSide":
init := "Nag_InitializeI":
m := 4:
n := 4:
igen := 1:
a := Matrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]], datatype=float[8]):
iseed := Vector([1762543, 9324783, 423446, 742355], datatype=integer[kernelopts('wordsize')/8]):
NAG:-g05qac(side, init, m, n, a, igen, iseed):
|
|
|