User guide
17-5
1 0 };
p1 = pvPacksm(p1,cov, "correlation",mask);
print pvGetParVector(p1);
0.5000
p1 = pvPutParVector(p1,.8);
print pvGetParVector(p1);
0.8000
print pvUnpack(p1, "correlation");
1.0000 .8000
0.8000 1.0000
print pvGetParNames(p1);
correlation[2,1]
print pvLength(p1);
1.0000
Also,pvTesttestsaninstancetomakesureitisproperlyconstructed.pvCreategen-
eratesaninitializedinstance,andpvGetIndexreturnstheindicesoftheparameters
ofaninputmatrixintheparametervector.Thislastfunctionismostusefulwhencon-
structinglinearconstraintindicesfortheoptimizationprograms.
17.2 Fast Pack Functions
Unpackingmatricesusingmatrixnamesisslowbecauseitrequiresastringsearch
throughastringarrayofnames.Asetofspecialpackingfunctionsareprovidedthat
avoidthesearchaltogether.Thesefunctionsusea"table"ofindicesthatyouspecifyto
findthematrixinthePVinstance.Forexample:
struct PV p1;
p1 = pvCreate;
y = rndn(4,1);
Run-Time Library
Structures










