Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in 0..inputs.len() {
- let mut out_data: Vec<&Option<Value>> = [].to_vec();
- let input = &inputs[i];
- let connections = &input["connections"].as_array().unwrap_or(&empty_arr);
- for i2 in 0..connections.len() {
- let c = &connections[i2];
- let nid = &c["node"].as_u64().expect("Invalid connection node ID") as &u64;
- let nn = &nodes.unwrap()[*nid as usize]; // TODO rename
- let out = self.back_process(&nn);
- let out_index = &c["output"]
- .as_u64()
- .expect("Invalid connection output index") as &u64;
- let val = &out[*out_index as usize];
- out_data.push(val);
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement