g05px Method
関数リスト一覧   NagLibrary Namespaceへ  ライブラリイントロダクション  本ヘルプドキュメントのchm形式版

g05px generates a random orthogonal matrix.

Syntax

C#
public static void g05px(
	string side,
	string init,
	int m,
	int n,
	G05..::.G05State g05state,
	double[,] a,
	out int ifail
)
Visual Basic (Declaration)
Public Shared Sub g05px ( _
	side As String, _
	init As String, _
	m As Integer, _
	n As Integer, _
	g05state As G05..::.G05State, _
	a As Double(,), _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void g05px(
	String^ side, 
	String^ init, 
	int m, 
	int n, 
	G05..::.G05State^ g05state, 
	array<double,2>^ a, 
	[OutAttribute] int% ifail
)
F#
static member g05px : 
        side:string * 
        init:string * 
        m:int * 
        n:int * 
        g05state:G05..::.G05State * 
        a:float[,] * 
        ifail:int byref -> unit 

Parameters

side
Type: System..::.String
On entry: indicates whether the matrix A is multiplied on the left or right by the random orthogonal matrix U.
side="L"
The matrix A is multiplied on the left, i.e., pre-multiplied.
side="R"
The matrix A is multiplied on the right, i.e., post-multiplied.
Constraint: side="L" or "R".
init
Type: System..::.String
On entry: indicates whether or not a should be initialized to the identity matrix.
init="I"
a is initialized to the identity matrix.
init="N"
a is not initialized and the matrix A must be supplied in a.
Constraint: init="I" or "N".
m
Type: System..::.Int32
On entry: m, the number of rows of the matrix A.
Constraints:
  • if side="L", m>1;
  • otherwise m1.
n
Type: System..::.Int32
On entry: n, the number of columns of the matrix A.
Constraints:
  • if side="R", n>1;
  • otherwise n1.
g05state
Type: NagLibrary..::.G05..::.G05State
An object of type G05.G05State.
a
Type: array< System..::.Double ,2>[,](,)[,]
An array of size [lda, n]
Note: lda must satisfy the constraint: ldam
On entry: if init="N", a must contain the matrix A.
On exit: the matrix UA when side="L" or the matrix A U when side="R".
ifail
Type: System..::.Int32 %
On exit: ifail=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

g05px pre- or post-multiplies an m by n matrix A by a random orthogonal matrix U, overwriting A. The matrix A may optionally be initialized to the identity matrix before multiplying by U, hence U is returned. U is generated using the method of Stewart (1980). The algorithm can be summarized as follows.
Let x1,x2,,xn-1 follow independent multinormal distributions with zero mean and variance Iσ2 and dimensions n,n-1,,2; let Hj=diagIj-1, Hj*, where Ij-1 is the identity matrix and Hj* is the Householder transformation that reduces xj to rjje1, e1 being the vector with first element one and the remaining elements zero and rjj being a scalar, and let D=diagsignr11,signr22,,signrnn. Then the product U=DH1H2Hn-1 is a random orthogonal matrix distributed according to the Haar measure over the set of orthogonal matrices of n. See Theorem 3.3 in Stewart (1980).

References

Error Indicators and Warnings

Accuracy

Further Comments

Example

See Also