Package slimpy_base.Core.Graph.Cleaner


Classes

class  cleaner
 cleaner cleans the graph of obsolete data, cleaner does not necessarily have to remove dead branches from the graph but the data that the nodes point to. More...

Functions

def __init__
 cleaner instance takes a graph and a depth
def clean
 usage: Call clean on a node after the node is finished adds the dependencies of node to the list of sources by calling add source.
def addSource
 Add a source node to the cleaner.
def remove
 removes node only if the reference count of node is 1
def get_cleaned_nodes
def all
 returns true if all values in iterable evaluate to True

Variables

string __copyright__
string __license__
tuple env = InstanceManager()
 graph
 depth
 __source
 _stored
 _cleaned


Function Documentation

def slimpy_base.Core.Graph.Cleaner.__init__ (   self,
  graph,
  depth = 1 
)

cleaner instance takes a graph and a depth

Definition at line 49 of file Cleaner.py.

def slimpy_base.Core.Graph.Cleaner.addSource (   self,
  node 
)

Add a source node to the cleaner.

compares the number of nodes to how many times node has been added to the cleaner. for example: let a subset of a graph be: data1 -> command1 data1 -> command2 then the number of nodes data1 depends on is 2 when command1 is finished processing Cleaner.Clean(command1) will be called and Cleaner.Clean(command2) will be called after command2 is finished with each time Cleaner.addSource(data1) is called so on the call of Cleaner.Clean(command2) data1 will be removed by using the method Cleaner.remove(data1)

Definition at line 93 of file Cleaner.py.

def slimpy_base.Core.Graph.Cleaner.all (   func,
  iterable 
)

returns true if all values in iterable evaluate to True

Parameters:
iterable,: list

Definition at line 164 of file Cleaner.py.

def slimpy_base.Core.Graph.Cleaner.clean (   self,
  node 
)

usage: Call clean on a node after the node is finished adds the dependencies of node to the list of sources by calling add source.

once all of ...

Definition at line 63 of file Cleaner.py.

def slimpy_base.Core.Graph.Cleaner.get_cleaned_nodes (   self  ) 

Definition at line 155 of file Cleaner.py.

def slimpy_base.Core.Graph.Cleaner.remove (   self,
  node 
)

removes node only if the reference count of node is 1

Definition at line 113 of file Cleaner.py.


Variable Documentation

string __copyright__

Initial value:

"""
Copyright 2008 Sean Ross-Ross
"""

Definition at line 8 of file Cleaner.py.

string __license__

Initial value:

"""
This file is part of SLIMpy .

SLIMpy is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SLIMpy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with SLIMpy . If not, see <http://www.gnu.org/licenses/>.
"""

Definition at line 11 of file Cleaner.py.

Definition at line 52 of file Cleaner.py.

Definition at line 55 of file Cleaner.py.

Definition at line 53 of file Cleaner.py.

Definition at line 51 of file Cleaner.py.

tuple env = InstanceManager()

Definition at line 42 of file Cleaner.py.

Definition at line 50 of file Cleaner.py.


Generated on Sun Aug 10 09:11:11 2008 for SLIMpy by  doxygen 1.5.6