X-Git-Url: https://i11git.iti.kit.edu/anon-gitweb/?p=Mitarbeiter%2FTim-Zeitz%2Fstud-rust-base.git;a=blobdiff_plain;f=README.md;h=4e8cb7613652d14b36498da5a8b224f174c69a5f;hp=c8cfc597eb546868907ccda24f1f9a9ae74a44eb;hb=9db2868f6f0fb9829f0f88a39601d4931736ed54;hpb=b52fc015957bcfa65d2e8fbb8d4ea44f4923e3a8 diff --git a/README.md b/README.md index c8cfc59..4e8cb76 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Insbesondere mit ["Dem Buch"](https://doc.rust-lang.org/book/second-edition/inde Rust hat ein Build- und Dependency Managementsystem. Yay. Heißt `cargo`. Mit `cargo build` kann man Programme bauen. -Im Falle dieses Repos baut das nur die Basislib und noch keine Executable, dazu dann z.B. `cargo build --bin example`. +Im Falle dieses Repos baut das nur die Basislib und noch keine Executable, dazu dann z.B. `cargo build --bin example` oder statt example ein anderes Programm wie `decode_vector`. Mit `cargo run` kann man bauen und direkt ausführen. Argumente an das Programm kommen nach einem `--`. Sobald die Performance interessant ist unbedingt `cargo run --release` nutzen - das ist ungefähr was `-O3` bei C++ ist. @@ -87,7 +87,7 @@ let head = Vec::::load_from("head_file_name").expect("could not read hea let travel_time = Vec::::load_from("weight_file_name").expect("could not read travel_time"); let node_id = 42; -for edge_id in head[first_out[node_id] as usize .. first_out[node_id + 1] as usize] { +for edge_id in first_out[node_id] .. first_out[node_id + 1] { println!("There is an arc from {} to {} with weight {}", node_id, head[edge_id as usize], travel_time[edge_id as usize]); } ```