native,cgo: update docs for Dlacn2

This commit is contained in:
Vladimir Chalupecky
2016-11-10 17:10:06 +01:00
committed by Vladimír Chalupecký
parent ab9be2d016
commit 7024c297e1
2 changed files with 26 additions and 17 deletions

View File

@@ -105,15 +105,18 @@ var _ lapack.Float64 = Implementation{}
// Dlacn2 estimates the 1-norm of an n×n matrix A using sequential updates with // Dlacn2 estimates the 1-norm of an n×n matrix A using sequential updates with
// matrix-vector products provided externally. // matrix-vector products provided externally.
// //
// Dlacn2 is called sequentially. In between calls, x should be overwritten by // Dlacn2 is called sequentially and it returns the value of est and kase to be
// A * X if kase == 1 // used on the next call.
// A^T * X if kase == 2 // On the initial call, kase must be 0.
// all other parameters should be unchanged during sequential calls, and the updated // In between calls, x must be overwritten by
// values of est and kase should be used. On the final return (when kase is returned // A * X if kase was returned as 1,
// as 0), V = A * W, where est = norm(V) / norm(W). // A^T * X if kase was returned as 2,
// and all other parameters must not be changed.
// On the final return, kase is returned as 0, v contains A*W where W is a
// vector, and est = norm(V)/norm(W) is a lower bound for 1-norm of A.
// //
// isign, v, and x must all have length n and will panic otherwise. isave is used // v, x, and isgn must all have length n and n must be at least 1, otherwise
// for temporary storage. // Dlacn2 will panic. isave is used for temporary storage.
// //
// Dlacn2 is an internal routine. It is exported for testing purposes. // Dlacn2 is an internal routine. It is exported for testing purposes.
func (impl Implementation) Dlacn2(n int, v, x []float64, isgn []int, est float64, kase int, isave *[3]int) (float64, int) { func (impl Implementation) Dlacn2(n int, v, x []float64, isgn []int, est float64, kase int, isave *[3]int) (float64, int) {

View File

@@ -13,18 +13,24 @@ import (
// Dlacn2 estimates the 1-norm of an n×n matrix A using sequential updates with // Dlacn2 estimates the 1-norm of an n×n matrix A using sequential updates with
// matrix-vector products provided externally. // matrix-vector products provided externally.
// //
// Dlacn2 is called sequentially. In between calls, x should be overwritten by // Dlacn2 is called sequentially and it returns the value of est and kase to be
// A * X if kase == 1 // used on the next call.
// A^T * X if kase == 2 // On the initial call, kase must be 0.
// all other parameters should be unchanged during sequential calls, and the updated // In between calls, x must be overwritten by
// values of est and kase should be used. On the final return (when kase is returned // A * X if kase was returned as 1,
// as 0), V = A * W, where est = norm(V) / norm(W). // A^T * X if kase was returned as 2,
// and all other parameters must not be changed.
// On the final return, kase is returned as 0, v contains A*W where W is a
// vector, and est = norm(V)/norm(W) is a lower bound for 1-norm of A.
// //
// isign, v, and x must all have length n and will panic otherwise. isave is used // v, x, and isgn must all have length n and n must be at least 1, otherwise
// for temporary storage. // Dlacn2 will panic. isave is used for temporary storage.
// //
// Dlacn2 is an internal routine. It is exported for testing purposes. // Dlacn2 is an internal routine. It is exported for testing purposes.
func (impl Implementation) Dlacn2(n int, v, x []float64, isgn []int, est float64, kase int, isave *[3]int) (float64, int) { func (impl Implementation) Dlacn2(n int, v, x []float64, isgn []int, est float64, kase int, isave *[3]int) (float64, int) {
if n < 1 {
panic("lapack: non-positive n")
}
checkVector(n, x, 1) checkVector(n, x, 1)
checkVector(n, v, 1) checkVector(n, v, 1)
if len(isgn) < n { if len(isgn) < n {