Skip to content

Commit

Permalink
Working on MinimumSpanningTree class initialization #7
Browse files Browse the repository at this point in the history
  • Loading branch information
garciparedes committed Sep 4, 2017
1 parent 4922ccb commit d30c191
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions tfgraph/algorithms/minimum_spanning_tree/minimum_spanning_tree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
import tensorflow as tf

from tfgraph import TensorFlowObject, Graph

class MinimumSpanningTree:

def __init__(self):
pass
class MinimumSpanningTree(TensorFlowObject):
"""
Attributes:
sess (:obj:`tf.Session`): This attribute represents the session that runs
the TensorFlow operations.
name (str): This attribute represents the name of the object in TensorFlow's
op Graph.
graph (:obj:`tfgraph.Graph`): The graph on witch it will be calculated the
algorithm. It will be treated as Directed Weighted Graph.
"""

def __init__(self, sess: tf.Session, name: str, graph: Graph):
"""
Constructor of the class.
Args:
sess (:obj:`tf.Session`): This attribute represents the session that runs
the TensorFlow operations.
name (str): This attribute represents the name of the object in
TensorFlow's op Graph.
graph (:obj:`tfgraph.Graph`): The graph on witch it will be calculated the
algorithm. It will be treated as Directed Weighted Graph.
"""
name = name + '_minimum_spanning_tree'
TensorFlowObject.__init__(self, sess, name)
self.graph = graph
pass

0 comments on commit d30c191

Please sign in to comment.