rwl / amd_order Goto Github PK
View Code? Open in Web Editor NEWApproximate Mimimum Degree ordering in Rust
Home Page: https://crates.io/crates/amd
License: Other
Approximate Mimimum Degree ordering in Rust
Home Page: https://crates.io/crates/amd
License: Other
The following example causes a panic with error 'attempt to subtract with overflow'.
fn main() {
let n: usize = 35;
let a_p = vec![
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 20, 24,
26, 29, 33, 35, 38, 42, 45, 47, 51, 54, 56, 61, 64, 66, 70, 74, 77];
let a_i = vec![
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 15, 1, 15, 16,
2, 15, 16, 17, 3, 18, 4, 18, 19, 5, 18, 19, 20, 6, 21, 7, 21, 22,
8, 21, 22, 23, 2, 11, 24, 1, 25, 0, 9, 14, 26, 5, 12, 27, 4, 28,
3, 9, 10, 14, 29, 8, 13, 30, 7, 31, 6, 10, 14, 32, 11, 12,
13, 33, 9, 10, 34];
let mut p_inv = vec![0; 77];
let control = amd::Control::default();
let mut a = [[""; 77]; 77];
amd::control(&control);
// This causes a panic
let (p, p_inv, info) = amd::order::<usize>(n, &a_p, &a_i, &control).unwrap();
amd::info(&info);
}
The issue appears at this line:
Line 382 in 258df58
I tried to find a smaller example but this was the best I could do. I couldn't put my finger on what it is that causes this issue - it doesn't happen for all matrices and is not obviously related to the dimension.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.