powerMethod {locStra}R Documentation

C++ implementation of the power method (von Mises iteration) to compute the largest eigenvector of a dense input matrix.

Description

C++ implementation of the power method (von Mises iteration) to compute the largest eigenvector of a dense input matrix.

Usage

powerMethod(m, initvector = 0)

Arguments

m

Symmetric matrix for which the largest eigenvector is sought.

initvector

Optional vector compatible with the input matrix which serves as a starting value for the iteration. Default is zero.

Value

The largest eigenvector of m.

References

Richard von Mises and Hilda Pollaczek-Geiringer (1929). Praktische Verfahren der Gleichungsaufloesung. ZAMM Zeitschrift fuer Angewandte Mathematik und Mechanik, 9:152-164.

Examples

require(locStra)
m <- matrix(1:9,3)
print(powerMethod(m))


[Package locStra version 1.9 Index]