lems.base package¶
Submodules¶
lems.base.base module¶
PyLEMS base class.
- author:
Gautham Ganapathy
- organization:
lems.base.errors module¶
Error classes.
- author:
Gautham Ganapathy
- organization:
- exception lems.base.errors.LEMSError(message, *params, **key_params)¶
Bases:
Exception
Base exception class.
- message¶
Error message
- Type:
string
- exception lems.base.errors.ModelError(message, *params, **key_params)¶
Bases:
LEMSError
Exception class to signal errors in creating the model.
- exception lems.base.errors.ParseError(message, *params, **key_params)¶
Bases:
LEMSError
Exception class to signal errors found during parsing.
- exception lems.base.errors.SimBuildError(message, *params, **key_params)¶
Bases:
LEMSError
Exception class to signal errors in building the simulation.
lems.base.map module¶
Map class.
- author:
Gautham Ganapathy
- organization:
lems.base.stack module¶
Stack class.
- author:
Gautham Ganapathy
- organization:
- class lems.base.stack.Stack¶
Bases:
LEMSBase
Basic stack implementation.
- is_empty()¶
Checks if the stack is empty.
- Returns:
True if the stack is empty, otherwise False.
- Return type:
Boolean
- pop()¶
Pops a value off the top of the stack.
- Returns:
Value popped off the stack.
- Return type:
- Raises:
StackError – Raised when there is a stack underflow.
- push(val)¶
Pushed a value onto the stack.
- Parameters:
val – Value to be pushed.
- stack¶
List used to store the stack contents.
- Type:
list
- top()¶
Returns the value off the top of the stack without popping.
- Returns:
Value on the top of the stack.
- Return type:
- Raises:
StackError – Raised when there is a stack underflow.
lems.base.util module¶
PyLEMS utility classes / functions
- author:
Gautham Ganapathy
- organization:
- lems.base.util.make_id()¶
- lems.base.util.merge_lists(l, base)¶
Merge in undefined list entries from given list.
- Parameters:
l (list) – List to be merged into.
base (list) – List to be merged into.
- lems.base.util.merge_maps(m, base)¶
Merge in undefined map entries from given map.
- Parameters:
m (lems.util.Map) – Map to be merged into.
base (lems.util.Map) – Map to be merged into.
- lems.base.util.validate_lems(file_name)¶
Module contents¶
- author:
Gautham Ganapathy
- organization: