This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Unit { | |
| // Entity is used as node or edge type, for different classifications | |
| // i.e. 'person', 'game', 'road', etc. | |
| constructor(entity, properties) { | |
| this.entity = entity + ''; | |
| this.load(properties || {}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let joe = {type: 'node', properties: {name: 'joe'}, input: [], output: []}; | |
| let likes = {type: 'edge', properties: {name: 'likes'}, input: null, output: null}; | |
| let minecraft = {type: 'node', properties: {name: 'minecraft'}, input: [], output: []}; | |
| joe.output.push(likes); | |
| likes.input = joe; | |
| likes.output = minecraft; | |
| minecraft.input.push(likes); |
NewerOlder