Package schrodinger :: Package application :: Package combiglide :: Package packages :: Module hierarchy :: Class Partitioning
[hide private]
[frames] | no frames]

Class Partitioning

A partitioning in the hierarchy. Contains methods to create a partitioning and add its parents and children. Meant to be called only by Hierarchy in this module, in the course of constructing the hierarchy.

Instance Methods [hide private]
 
__init__(self, hierarchy, name, level)
Add a partitioning with the given name at the given level.
 
addChild(self, child)
Add a child partitioning to the current partitioning.
 
addParent(self, parent)
Add a parent partitioning to the current partitioning.
Partition
_getOrCreatePartitionByName(self, partition_name)
Return the Partition object bearing the given partition_name that resides in the current partitioning.
Instance Variables [hide private]
Dict of str to Partition _partition_names_d
Dict of partition names to partitions in the current partitioning
set of Partitioning children
Children of the current Partitioning (set indirectly by Hierarchy.__init__())
Hierarchy hierarchy
Hierarchy that the current Partitioning belongs to (set by Partitioning.__init__())
int level
Level of the current Partitioning (set by Partitioning.__init__())
str name
Name of the current Partitioning (set by Partitioning.__init__())
set of Partitioning parents
Parents of the current Partitioning (set indirectly by Hierarchy.__init__())
set of Partition in the current partitioning partitions
Partition objects contained within the current partitioning
Method Details [hide private]

__init__(self, hierarchy, name, level)
(Constructor)

 

Add a partitioning with the given name at the given level.

Parameters:
  • name (str) - Name of the partitioning
  • level (int) - Level at which the partitioning is to be added

addChild(self, child)

 

Add a child partitioning to the current partitioning.

Parameters:

addParent(self, parent)

 

Add a parent partitioning to the current partitioning.

Parameters:
  • parent (Partitioning) - The parent partitioning to be added

_getOrCreatePartitionByName(self, partition_name)

 

Return the Partition object bearing the given partition_name that resides in the current partitioning. If a partition with the given name does not exist in the current partitioning, create it and add it. This is entry point for the creation of partitions.

Parameters:
  • partition_name (str) - The name of the partition to be returned
Returns: Partition
The Partition retrieved or newly added