|
Swarm-NG
1.1
|
The default implementation of ensemble data structor that stores data in system memory. More...
Public Member Functions | |
| def | create |
| Create an ensemble with specified number of systems and bodies. More... | |
| def | save_to_bin |
| Save a binary representation of the whole ensemble to a file. More... | |
| def | save_to_text |
| Save a textual representation of the whole ensemble to a file. More... | |
| def | load_from_text |
| Load an ensemble from a text file. More... | |
| def | load_from_bin |
| Load an ensemble from a binary file. More... | |
Public Member Functions inherited from swarmng.Ensemble | |
| def | __getitem__ |
| Get the ith system as a System object. More... | |
| def | __len__ |
| Number of systems in the ensemble equal to nsys Usage. More... | |
Additional Inherited Members | |
Properties inherited from swarmng.Ensemble | |
| nsys = property | |
| Number of systems in the ensemble (integer value) | |
| nbod = property | |
| Number of bodies per system (integer value) | |
The default implementation of ensemble data structor that stores data in system memory.
Definition at line 240 of file __init__.doc.py.
| def swarmng.DefaultEnsemble.create | ( | number_of_bodies, | |
| number_of_systems | |||
| ) |
Create an ensemble with specified number of systems and bodies.
number_of_bodies : number of bodies per system number_of_systems: total number of systems in the ensemble.Note that an ensemble is not resizable and all systems have the same number of bodies.
Definition at line 250 of file __init__.doc.py.
| def swarmng.DefaultEnsemble.load_from_bin | ( | fileName) |
Load an ensemble from a binary file.
returns a DefaultEnsemble
Definition at line 266 of file __init__.doc.py.
| def swarmng.DefaultEnsemble.load_from_text | ( | fileName) |
Load an ensemble from a text file.
returns a DefaultEnsemble
Definition at line 261 of file __init__.doc.py.
| def swarmng.DefaultEnsemble.save_to_bin | ( | self, | |
| fileName | |||
| ) |
Save a binary representation of the whole ensemble to a file.
fileName : name of the file to save the contents to Definition at line 253 of file __init__.doc.py.
| def swarmng.DefaultEnsemble.save_to_text | ( | self, | |
| fileName | |||
| ) |
Save a textual representation of the whole ensemble to a file.
fileName : name of the file to save the contents to Definition at line 256 of file __init__.doc.py.