|
|
@ -8,6 +8,7 @@ from .trajectory import Trajectory |
|
|
|
from ..utility.abstract_importer import AbstractImporter |
|
|
|
from ..utility.abstract_importer import AbstractImporter |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MESSAGE_HAS_TO_CONTAIN_EXCEPTION = 'The importer object has to contain the all processed data!' |
|
|
|
|
|
|
|
|
|
|
|
class SamplePath(object): |
|
|
|
class SamplePath(object): |
|
|
|
"""Aggregates all the informations about the trajectories, the real structure of the sampled net and variables |
|
|
|
"""Aggregates all the informations about the trajectories, the real structure of the sampled net and variables |
|
|
@ -25,15 +26,15 @@ class SamplePath(object): |
|
|
|
""" |
|
|
|
""" |
|
|
|
self._importer = importer |
|
|
|
self._importer = importer |
|
|
|
if self._importer._df_variables is None or self._importer._concatenated_samples is None: |
|
|
|
if self._importer._df_variables is None or self._importer._concatenated_samples is None: |
|
|
|
raise RuntimeError('The importer object has to contain the all processed data!') |
|
|
|
raise RuntimeError() |
|
|
|
if self._importer._df_variables.empty: |
|
|
|
if self._importer._df_variables.empty: |
|
|
|
raise RuntimeError('The importer object has to contain the all processed data!') |
|
|
|
raise RuntimeError(MESSAGE_HAS_TO_CONTAIN_EXCEPTION) |
|
|
|
if isinstance(self._importer._concatenated_samples, pd.DataFrame): |
|
|
|
if isinstance(self._importer._concatenated_samples, pd.DataFrame) and\ |
|
|
|
if self._importer._concatenated_samples.empty: |
|
|
|
self._importer._concatenated_samples.empty: |
|
|
|
raise RuntimeError('The importer object has to contain the all processed data!') |
|
|
|
raise RuntimeError(MESSAGE_HAS_TO_CONTAIN_EXCEPTION) |
|
|
|
if isinstance(self._importer._concatenated_samples, np.ndarray): |
|
|
|
if isinstance(self._importer._concatenated_samples, np.ndarray) and\ |
|
|
|
if self._importer._concatenated_samples.size == 0: |
|
|
|
self._importer._concatenated_samples.size == 0: |
|
|
|
raise RuntimeError('The importer object has to contain the all processed data!') |
|
|
|
raise RuntimeError(MESSAGE_HAS_TO_CONTAIN_EXCEPTION) |
|
|
|
self._trajectories = None |
|
|
|
self._trajectories = None |
|
|
|
self._structure = None |
|
|
|
self._structure = None |
|
|
|
self._total_variables_count = None |
|
|
|
self._total_variables_count = None |
|
|
|