pub struct LocallyTwistedCube(/* private fields */);
Implementations§
Source§impl LocallyTwistedCube
impl LocallyTwistedCube
Sourcepub fn new(n: Dims) -> Self
pub fn new(n: Dims) -> Self
Examples found in repository?
examples/ltq_examples.rs (line 19)
14fn example_lemma1() {
15 println!("this is an example of lemma1 on a LTQ.");
16 let n = 8;
17 let s = 0b0000_0001;
18
19 let graph = LocallyTwistedCube::new(n);
20
21 let path = graph.n_paths_to_node(n, s);
22
23 println!("{:#?}", path);
24}
25
26fn example_lemma2() {
27 println!("this is an example of lemma2 on a LTQ");
28 let n = 8;
29 let s = 0b0011_0011;
30 let d = 0b1010_1010;
31
32 let graph = LocallyTwistedCube::new(n);
33
34 let path = graph.single_path(s, d);
35
36 println!("{:?}", path);
37}
38
39fn example_node_to_set() {
40 println!("This is an example of node to set on a LTQ");
41 let n = 8;
42 let s = 0b0101_0101;
43 let mut d = vec![];
44
45 for i in 0..8 {
46 d.push(1 << i);
47 }
48
49 let graph = LocallyTwistedCube::new(n);
50
51 let paths = graph.node_to_set_disjoint_paths(s, &d);
52
53 println!("{:#?}", paths);
54}
55
56fn example_node_to_node() {
57 println!("This is an example of node to node on a LTQ");
58 let n = 8;
59 let s = 0b0101_0101;
60 let d = 0b0000_1111;
61
62 let graph = LocallyTwistedCube::new(n);
63
64 let paths = graph.node_to_node_disjoint_paths(s, d);
65
66 println!("{:#?}", paths);
67}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocallyTwistedCube
impl RefUnwindSafe for LocallyTwistedCube
impl Send for LocallyTwistedCube
impl Sync for LocallyTwistedCube
impl Unpin for LocallyTwistedCube
impl UnwindSafe for LocallyTwistedCube
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more