Skip to content
Snippets Groups Projects
Commit fd9fac12 authored by Udo Eisenbarth's avatar Udo Eisenbarth :speech_balloon:
Browse files

Merge branch '70-optical-analyze-add-consistency-check' into 'main'

Resolve "Optical::analyze add consistency check"

Closes #70

See merge request !33
parents 9b8161bd 5e71b77b
No related branches found
No related tags found
1 merge request!33Resolve "Optical::analyze add consistency check"
Pipeline #7781 passed
......@@ -177,6 +177,12 @@ impl OpticScenery {
for idx in sorted {
let node = self.g.0.node_weight(idx).unwrap();
let incoming_edges: HashMap<String, Option<LightData>> = self.incoming_edges(idx);
// paranoia: check if all incoming ports are really input ports of the node to be analyzed
let input_ports = node.0.borrow().ports().inputs();
if !incoming_edges.iter().all(|e| input_ports.contains(e.0)) {
return Err(OpossumError::Analysis("input light data contains port which is not an input port of the node. Data will be discarded.".into()));
}
//
let outgoing_edges = node
.0
.borrow_mut()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment