jagua_rs/probs/spp/entities/
solution.rs1use crate::Instant;
2use crate::entities::LayoutSnapshot;
3use crate::probs::spp::entities::strip::Strip;
4
5#[derive(Debug, Clone)]
7pub struct SPSolution {
8 pub(crate) strip: Strip,
9 pub(crate) layout_snapshot: LayoutSnapshot,
10 pub time_stamp: Instant,
12}
13
14impl SPSolution {
15 #[must_use]
16 pub fn strip(&self) -> &Strip {
17 &self.strip
18 }
19
20 #[must_use]
21 pub fn layout_snapshot(&self) -> &LayoutSnapshot {
22 &self.layout_snapshot
23 }
24
25 #[must_use]
26 pub fn density(&self) -> f32 {
27 self.layout_snapshot.density()
28 }
29 #[must_use]
30 pub fn strip_width(&self) -> f32 {
31 self.strip.width
32 }
33}