SHARE
TWEET

Untitled

a guest Jun 27th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1
  2.       +
  3.  F
  4.      
  5. for node in nodes {
  6.     if(node.type == '+') {
  7.         node.value = node.input1.value + node.input2.value;
  8.     }
  9.     if(node.type == '1') { ... }
  10.     if(node.type == 'F') { ... }
  11. }
  12.      
  13. global map = new HashMap<Node, double>();
  14. ...
  15. map.clear();
  16. for node in nodes {
  17.     if(node.type == '1') {}
  18.     if(node.type == 'F') {
  19.         map.set(node, node.value == 1 ? 0 : 1);
  20.     }
  21.     if(node.type == '+') {
  22.         map.set(node, node.input1.value + node.input2.value);
  23.     }
  24. }
  25. map.forEach(k, v -> k.value = v);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top