algebraeon_geometry/simplexes/
mod.rs1use super::*;
2
3impl<FS: OrderedRingStructure + FieldStructure, SP: Borrow<AffineSpace<FS>> + Clone> PartialOrd
6 for Vector<FS, SP>
7{
8 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
9 let space = common_space(
10 self.ambient_space().borrow(),
11 other.ambient_space().borrow(),
12 )?;
13 for i in 0..space.linear_dimension().unwrap() {
14 match space
15 .ordered_field()
16 .ring_cmp(self.coordinate(i), other.coordinate(i))
17 {
18 std::cmp::Ordering::Less => {
19 return Some(std::cmp::Ordering::Less);
20 }
21 std::cmp::Ordering::Equal => {}
22 std::cmp::Ordering::Greater => {
23 return Some(std::cmp::Ordering::Greater);
24 }
25 }
26 }
27 Some(std::cmp::Ordering::Equal)
28 }
29}
30impl<FS: OrderedRingStructure + FieldStructure, SP: Borrow<AffineSpace<FS>> + Clone> Ord
31 for Vector<FS, SP>
32{
33 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
34 match self.partial_cmp(other) {
35 Some(ans) => ans,
36 None => panic!(),
37 }
38 }
39}
40
41#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
42pub enum InteriorBoundaryLabel {
43 Interior,
44 Boundary,
45}
46
47mod simplex;
48pub use simplex::*;
49
50mod convex_hull;
51pub use convex_hull::*;
52
53mod simplex_collection;
54pub use simplex_collection::*;
55
56mod simplicial_complex;
57pub use simplicial_complex::*;
58
59mod partial_simplicial_complex;
60pub use partial_simplicial_complex::*;
61
62mod simplicial_disjoint_union;
63pub use simplicial_disjoint_union::*;
64
65mod boolean_opperations;
66