Skip to content
Snippets Groups Projects
Commit 8e0d42f1 authored by Manuel Baum's avatar Manuel Baum
Browse files

Added some basic classes

parent 810f635f
No related branches found
No related tags found
No related merge requests found
*.pyc
import sys
sys.path.append("../../lib/networkx-1.7-py2.7.egg")
import networkx as nx
class BayesNet(object):
graph = nx.Graph()
def __init__(self):
print "lol"
File added
from core.BayesNet import *
from core.Node import *
bn = BayesNet()
n = Node()
bn.add_node(n)
bn.add_node("lol")
from core import BayesNet
bn = BayesNet()
import sys
sys.path.append("../lib/networkx-1.7-py2.7.egg")
import networkx as nx
import Node.Node
class BayesNet(object):
graph = nx.DiGraph()
def __init__(self):
print "lol"
def add_node(self, node):
if isinstance(node, Node.Node):
self.graph.add_node(node)
else:
raise Exception("Can only add 'Node' and its subclasses as nodes into the BayesNet")
File added
import sys
sys.path.append("../lib/networkx-1.7-py2.7.egg")
import networkx as nx
import Node
class BayesNet(object):
graph = nx.Graph()
def __init__(self):
print "lol"
def add_node(self, node):
if isinstance(node, Node.Node):
graph.add_node(node)
else:
raise Exception("Can only add 'Node' and its subclasses as nodes into the BayesNet")
class Node(object):
name = "SomeNode"
File added
File added
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