g05px generates a random orthogonal matrix.
public static void g05px( side, init, m, n, G05..::.G05State g05state, [,] a, out ifail )
|Visual Basic (Declaration)|
Public Shared Sub g05px ( _ side As , _ init As , _ m As , _ n As , _ g05state As G05..::.G05State, _ a As (,), _ < > ByRef ifail As _ )
public: static void g05px( ^ side, ^ init, m, n, G05..::.G05State^ g05state, array< ,2>^ a, [ ] % ifail )
static member g05px : side: * init: * m: * n: * g05state:G05..::.G05State * a: [,] * ifail: byref -> unit
On entry: indicates whether the matrix is multiplied on the left or right by the random orthogonal matrix .
Constraint: or .
- The matrix is multiplied on the left, i.e., pre-multiplied.
- The matrix is multiplied on the right, i.e., post-multiplied.
On entry: indicates whether or not a should be initialized to the identity matrix.Constraint: or .
On entry: , the number of rows of the matrix .Constraints:
- if , ;
- otherwise .
On entry: , the number of columns of the matrix .Constraints:
- if , ;
- otherwise .
- Type: array<
,2>[,](,)[,]An array of size [lda, n]Note: lda must satisfy the constraint:On entry: if , a must contain the matrix .On exit: the matrix when or the matrix when .
On exit: unless the method detects an error (see [Error Indicators and Warnings]).
g05px pre- or post-multiplies an by matrix by a random orthogonal matrix , overwriting . The matrix may optionally be initialized to the identity matrix before multiplying by , hence is returned. is generated using the method of Stewart (1980). The algorithm can be summarized as follows.
Let follow independent multinormal distributions with zero mean and variance and dimensions ; let , where is the identity matrix and is the Householder transformation that reduces to , being the vector with first element one and the remaining elements zero and being a scalar, and let . Then the product is a random orthogonal matrix distributed according to the Haar measure over the set of orthogonal matrices of . See Theorem 3.3 in Stewart (1980).
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (lda, lstate) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, g05state vector was not initialized or has been corrupted.
The maximum error in should be a modest multiple of machine precision (see X02 class).
Following initialization of the pseudorandom number generator by a call to the state constructor (for a repeatable sequence), a by orthogonal matrix is generated using the option and the result printed.