How to extract the upper triangular matrix w or w/o diagonal in Chapel -


the best stories start matrix a.

var a: [{1..4,1..4}] real = (   (4, -30, 60, -35),   (-30, 300, -675, 420),   (60, -675, 1620, -1050),   (-35, 420, -1050, 700)   ); 

i recall somewhere can upper triangle, can't find in chapel docs can set in/exclude diagonal?

using linearalgebra library:

use linearalgebra;  var a: [{1..4,1..4}] real = (   (4, -30, 60, -35),   (-30, 300, -675, 420),   (60, -675, 1620, -1050),   (-35, 420, -1050, 700)   );  var uppertriangle = triu(a);  // confirm worked writeln(istriu(uppertriangle));  

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -