({{, GERC[α,x,y,a] 
computes the rank-one update a+α (RefLink[Outer, paclet:ref/Outer])[(RefLink[Times, paclet:ref/Times]),x,(RefLink[Conjugate, paclet:ref/Conjugate])[y]] and resets a to the result.}})

OpenersNotesSection(Spacer1)Details

To use GERC, you first need to load the BLAS Package using (RefLink[Needs, paclet:ref/Needs])["LinearAlgebra`BLAS`"].

The following arguments must be given:

Dimensions of the matrix and vector arguments must be such that the dot product and addition are well defined.

OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Load the BLAS package:

Needs["LinearAlgebra`BLAS`"]

Apply rank-one update to a matrix:

a={{1,2 I},{3-I,4}};
GERC[1/2,{1,1},{-2 I,1+I},a];
a

OpenersExampleSection1(Spacer1)Scope  (4)

Real matrix and vectors:

a={{-2.1,0.,3.2},{4.3,0.2,-0.3},{4.1,2.6,0.}};
GERC[1.,{-1.2,0.,2.3},{3.1,0.3,-0.9},a];
a

Complex matrix and vectors:

a={{2.1+0.5I,3.2+I},{4.1I,3.8}};
GERC[1.0,{3.2I,-0.4I},{2.3+2I,3.4I},a];
a

Arbitrary-precision matrix and vectors:

a={{1`20,2},{3,4}};
GERC[1`20/2,{1`20,2+I},{-2,1-I},a];
a

Integer-symbolic matrix and vectors:

a={{m11,m12},{m21,m22}};
GERC[α,{1,2},{-2 I,1+I},a];
a

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

GERC[α,x,y,a] is equivalent to a=a+α (RefLink[Outer, paclet:ref/Outer])[(RefLink[Times, paclet:ref/Times]),x,(RefLink[Conjugate, paclet:ref/Conjugate])[y]]:

a=a1=RandomComplex[1+I,{5,7}];
x=RandomComplex[1+I,{5}];
y=RandomComplex[1+I,{7}];
α=RandomComplex[];
GERC[α,x,y,a];
a==α Outer[Times,x,Conjugate[y]]+a1

This can also be expressed as a=a+α (RefLink[Transpose, paclet:ref/Transpose])[{x}].{(RefLink[Conjugate, paclet:ref/Conjugate])[y]}:

a==α Transpose[{x}].{Conjugate[y]}+a1

OpenersExampleSection4(Spacer1)Possible Issues  (2)

The last argument must be a symbol:

GERC[1/2,{1,2},{-2,1},{{1,2},{3,4}}]

The last argument must be initialized to a matrix:

Clear[a];
GERC[1/2,{1,2},{-2,1},a]

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Linear Algebra Subroutines, paclet:LowLevelLinearAlgebra/guide/BLASGuide])}})}})