forked from garciparedes/tf_G
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on MinimumSpanningTree class initialization #7
- Loading branch information
1 parent
4922ccb
commit d30c191
Showing
1 changed file
with
30 additions
and
3 deletions.
There are no files selected for viewing
33 changes: 30 additions & 3 deletions
33
tfgraph/algorithms/minimum_spanning_tree/minimum_spanning_tree.py
This file contains 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
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 |