Skip to content

add an example to compute matrix ranks

STEVAN Antoine requested to merge matrix-rank-example into main

this MR

  • implements the Display trait for Matrix to allow to show it
  • makes from_vec_vec and rank public
  • add rank.rs

example

Note

  • this has been run with Nushell
  • a -1 is an impossible value and thus will generate a random element instead
cargo run --example rank -- ...[
    "1,0,-1"
    "0,0,-1"
    "0,1,-1"
    "0,0,-1"
    "0,0,-1"
]

will output

/1 0 314995448938783965509764369801440879676\
|0 0 236699644179594774251145667390896459418|
|0 1 187004145196223910655928022134499908037|
|0 0 273500202756822505549423242088598868403|
\0 0 286599222098418496365691949902317095505/

m: 5
n: 3
r: 5

Merge request reports