pub enum BcsrError {
Show 15 variants
OffsetLengthOverflow {
count: usize,
},
OffsetLength {
section: BcsrSection,
expected: usize,
actual: usize,
},
HyperedgeOffsetLengthMismatch {
head_offsets_len: usize,
tail_offsets_len: usize,
},
VertexOffsetLengthMismatch {
outgoing_offsets_len: usize,
incoming_offsets_len: usize,
},
FirstOffset {
section: BcsrSection,
actual: usize,
},
NonMonotonicOffset {
section: BcsrSection,
index: usize,
previous: usize,
actual: usize,
},
FinalOffset {
section: BcsrSection,
final_offset: usize,
value_len: usize,
},
VertexOutOfRange {
section: BcsrSection,
index: usize,
vertex: usize,
vertex_count: usize,
},
HyperedgeOutOfRange {
section: BcsrSection,
index: usize,
hyperedge: usize,
hyperedge_count: usize,
},
OutgoingTotalMismatch {
head_participants_len: usize,
outgoing_hyperedges_len: usize,
},
IncomingTotalMismatch {
tail_participants_len: usize,
incoming_hyperedges_len: usize,
},
NotStrictlyAscending {
section: BcsrSection,
index: usize,
previous: usize,
actual: usize,
},
UsizeOverflow {
value: usize,
},
TotalIncidenceCountOverflow {
p_head: usize,
p_tail: usize,
},
CrossDirectionMismatch {
side: BcsrRoleSide,
hyperedge: usize,
vertex: usize,
},
}Expand description
Bipartite-CSR validation error.
Returned by BcsrHypergraph::open and
BcsrHypergraph::open_with when one
of the eight section payloads fails validation.
§Performance
perf: unspecified; errors are returned only from validation paths.
Variants§
OffsetLengthOverflow
count + 1 overflowed usize, so the offset slice length cannot fit.
OffsetLength
An offset slice has the wrong length.
Fields
section: BcsrSectionWhich offset section this error came from.
HyperedgeOffsetLengthMismatch
head_offsets and tail_offsets disagree on hyperedge_count + 1.
VertexOffsetLengthMismatch
vertex_outgoing_offsets and vertex_incoming_offsets disagree on
vertex_count + 1.
Fields
FirstOffset
The first offset in an offset slice was not zero.
Fields
section: BcsrSectionWhich offset section this error came from.
NonMonotonicOffset
Offsets were not monotonically non-decreasing.
Fields
section: BcsrSectionWhich offset section this error came from.
FinalOffset
Final offset does not match the corresponding value slice length.
Fields
section: BcsrSectionWhich offset section this error came from.
VertexOutOfRange
A vertex ID was outside 0..vertex_count.
Fields
section: BcsrSectionWhich value section the bad ID came from.
HyperedgeOutOfRange
A hyperedge ID was outside 0..hyperedge_count.
Fields
section: BcsrSectionWhich value section the bad ID came from.
OutgoingTotalMismatch
head_participants.len() and vertex_outgoing_hyperedges.len()
disagree on the total outgoing-incidence count.
Fields
IncomingTotalMismatch
tail_participants.len() and vertex_incoming_hyperedges.len()
disagree on the total incoming-incidence count.
Fields
NotStrictlyAscending
A range-local sequence (e.g. one hyperedge’s head participants, or one vertex’s outgoing hyperedges) was not strictly ascending.
Bipartite-CSR requires set semantics within each range: vertex IDs inside a single hyperedge’s head/tail and hyperedge IDs inside a single vertex’s outgoing/incoming must be strictly increasing.
Fields
section: BcsrSectionWhich value section the bad pair came from.
UsizeOverflow
A stored index value did not fit in usize on this target platform.
TotalIncidenceCountOverflow
P_head + P_tail overflowed usize, so the incidence ID space cannot
be indexed on this target.
Fields
CrossDirectionMismatch
Cross-CSR consistency check (Strict-only) found a hyperedge that is recorded in one direction but missing from the other.
Trait Implementations§
Source§impl Error for BcsrError
impl Error for BcsrError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()