test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
NodeCut.Match Class Reference
Inheritance diagram for NodeCut.Match:

Public Member Functions

def __init__
 
def cut
 
def pathContaining
 
def selectManyNames
 
def selectOneName
 
def trimNames
 
def trimPaths
 

Public Attributes

 in_names
 
 in_paths
 
 out_edges
 
 out_names
 
 out_paths
 
 out_totals
 

Detailed Description

Definition at line 63 of file NodeCut.py.

Constructor & Destructor Documentation

def NodeCut.Match.__init__ (   self,
  pre_in,
  pre_out 
)

Definition at line 64 of file NodeCut.py.

64 
65  def __init__(self, pre_in, pre_out):
66  self.in_names = pre_in + "names"
67  self.in_paths = pre_in + "paths"
68  self.out_names = pre_in + "names"
69  self.out_paths = pre_in + "paths"
70  self.out_edges = pre_out + "edges"
71  self.out_totals = pre_out + "totals"
def __init__
Definition: NodeCut.py:64

Member Function Documentation

def NodeCut.Match.cut (   matcher)

Definition at line 72 of file NodeCut.py.

References NodeCut.Match.in_names, and NodeCut.Match.out_names.

72 
73  def cut(matcher):
74  fin_names = open(self.in_names,'r')
75  fout_names = open(self.out_names,'w')
76  names = []
77  for line in fin.names.xreadlines():
78  n = NameLine(line)
79  b = matcher(n)
80  if b<0: break
81  if b:
82  names[n.id()]
83  fout.write(line)
84  return names
def NodeCut.Match.pathContaining (   id)

Definition at line 121 of file NodeCut.py.

122  def pathContaining(id):
123  pass
def pathContaining
Definition: NodeCut.py:121
def NodeCut.Match.selectManyNames (   ids)

Definition at line 107 of file NodeCut.py.

References NodeCut.Match.in_names, and NodeCut.Match.out_names.

108  def selectManyNames(ids):
109  fin_names = open(self.in_names,'r')
110  fout_names = open(self.out_names,'w')
111  names = {}
112  for line in fin.names.xreadlines():
113  a=line.split()
114  if ids.get(int(a[0]))!=None:
115  fout.write(line)
def selectManyNames
Definition: NodeCut.py:107
def NodeCut.Match.selectOneName (   value)

Definition at line 85 of file NodeCut.py.

References NodeCut.Match.in_names, and NodeCut.Match.out_names.

85 
86  def selectOneName(value):
87  fin_names = open(self.in_names,'r')
88  fout_names = open(self.out_names,'w')
89  names = {}
90  for line in fin.names.xreadlines():
91  a=line.split()
92  if int(a[3])==value: break
93  names[int(a[0])]=1
94  fout.write(line)
95  return names
def selectOneName
Definition: NodeCut.py:85
def NodeCut.Match.trimNames (   cutoff)

Definition at line 96 of file NodeCut.py.

References NodeCut.Match.in_names, and NodeCut.Match.out_names.

96 
97  def trimNames(cutoff):
98  fin_names = open(self.in_names,'r')
99  fout_names = open(self.out_names,'w')
100  names = []
101  for line in fin.names.xreadlines():
102  a=line.split()
103  if int(a[3])<cuttoff: break
104  names[int(a[0])]
105  fout.write(line)
106  return names
def trimNames
Definition: NodeCut.py:96
def NodeCut.Match.trimPaths (   cutoff)

Definition at line 116 of file NodeCut.py.

References NodeCut.Match.in_paths, and NodeCut.Match.out_paths.

117  def trimPaths(cutoff):
118  fin_paths = open(self.in_paths,'r')
119  fout_paths = open(self.out_paths,'w')
120  self.tot_paths
def trimPaths
Definition: NodeCut.py:116

Member Data Documentation

NodeCut.Match.in_names

Definition at line 65 of file NodeCut.py.

Referenced by NodeCut.Match.cut(), NodeCut.Match.selectManyNames(), NodeCut.Match.selectOneName(), and NodeCut.Match.trimNames().

NodeCut.Match.in_paths

Definition at line 66 of file NodeCut.py.

Referenced by NodeCut.Match.trimPaths().

NodeCut.Match.out_edges

Definition at line 69 of file NodeCut.py.

NodeCut.Match.out_names

Definition at line 67 of file NodeCut.py.

Referenced by NodeCut.Match.cut(), NodeCut.Match.selectManyNames(), NodeCut.Match.selectOneName(), and NodeCut.Match.trimNames().

NodeCut.Match.out_paths

Definition at line 68 of file NodeCut.py.

Referenced by NodeCut.Match.trimPaths().

NodeCut.Match.out_totals

Definition at line 70 of file NodeCut.py.