A Discrete-Event Network Simulator
API
Public Member Functions | Public Attributes | Private Member Functions | List of all members
grid.TimelineDataRange Class Reference

TimelineDataRange. More...

Public Member Functions

def __init__ (self, name='')
 Initializer. More...
 
def add_range (self, range)
 Add range. More...
 
def get_all (self)
 Get all ranges. More...
 
def get_bounds (self)
 Get bounds. More...
 
def get_ranges (self, start, end)
 Get selected ranges. More...
 
def get_ranges_bounds (self, start, end)
 Get ranges bounds. More...
 
def sort (self)
 Sort ranges. More...
 

Public Attributes

 name
 name More...
 
 ranges
 ranges More...
 

Private Member Functions

def __search (self, key)
 Search. More...
 

Detailed Description

TimelineDataRange.

Definition at line 91 of file grid.py.

Constructor & Destructor Documentation

◆ __init__()

def grid.TimelineDataRange.__init__ (   self,
  name = '' 
)

Initializer.

Parameters
selfthis object
namename
Returns
none

Definition at line 96 of file grid.py.

Member Function Documentation

◆ __search()

def grid.TimelineDataRange.__search (   self,
  key 
)
private

Search.

Parameters
selfthis object
keykey
Returns
index if found or -1 if not found

Definition at line 105 of file grid.py.

References grid.TimelineDataRange.ranges.

Referenced by grid.TimelineEvent.get_events(), grid.TimelineEvent.get_events_bounds(), grid.TimelineDataRange.get_ranges(), and grid.TimelineDataRange.get_ranges_bounds().

◆ add_range()

def grid.TimelineDataRange.add_range (   self,
  range 
)

Add range.

Parameters
selfthis object
rangerange
Returns
none

Definition at line 123 of file grid.py.

References grid.TimelineDataRange.ranges.

◆ get_all()

def grid.TimelineDataRange.get_all (   self)

Get all ranges.

Parameters
selfthis object
Returns
the ranges

Definition at line 130 of file grid.py.

References grid.TimelineDataRange.ranges.

◆ get_bounds()

def grid.TimelineDataRange.get_bounds (   self)

Get bounds.

Parameters
selfthis object
Returns
the bounds

Definition at line 176 of file grid.py.

References grid.TimelineDataRange.ranges, and return.

◆ get_ranges()

def grid.TimelineDataRange.get_ranges (   self,
  start,
  end 
)

Get selected ranges.

Parameters
selfthis object
startrange start
endrange end
Returns
the range or and empty list

Definition at line 136 of file grid.py.

References grid.TimelineDataRange.__search(), and grid.TimelineDataRange.ranges.

◆ get_ranges_bounds()

def grid.TimelineDataRange.get_ranges_bounds (   self,
  start,
  end 
)

Get ranges bounds.

Parameters
selfthis object
startrange start
endrange end
Returns
range

Definition at line 153 of file grid.py.

References grid.TimelineDataRange.__search(), grid.TimelineDataRange.ranges, and return.

◆ sort()

def grid.TimelineDataRange.sort (   self)

Sort ranges.

Parameters
selfthis object
Returns
none

Definition at line 170 of file grid.py.

References grid.TimelineDataRange.ranges.

Member Data Documentation

◆ name

grid.TimelineDataRange.name

name

Definition at line 102 of file grid.py.

◆ ranges

grid.TimelineDataRange.ranges

The documentation for this class was generated from the following file: