firecrown.parameters.DerivedParameterCollection

class firecrown.parameters.DerivedParameterCollection(derived_parameters)[source]

Bases: object

Represents a list of DerivedParameter objects.

Parameters

derived_parameters (Sequence[DerivedParameter]) –

Public Methods:

__init__(derived_parameters)

Construct an instance from a sequence of DerivedParameter objects.

__add__(other)

Return a new DerivedParameterCollection with the lists of DerivedParameter objects.

__eq__(other)

Compare two DerivedParameterCollection objects for equality.

__iter__()

rtype

Iterator[Tuple[str, str, float]]

add_required_parameter(derived_parameter)

Adds derived_parameter to the collection, it raises an ValueError if a required parameter with the same name is already present in the collection.

get_derived_list()

Implement lazy iteration through the contained parameter names.


__add__(other)[source]

Return a new DerivedParameterCollection with the lists of DerivedParameter objects.

If other is none return self. Otherwise, constructs a new object representing the addition.

Note that this function returns a new object that does not share state with either argument to the addition operator.

Parameters

other (Optional[DerivedParameterCollection]) –

__eq__(other)[source]

Compare two DerivedParameterCollection objects for equality.

This implementation raises a NotImplemented exception unless both objects are DerivedParameterCollection objects.

Two DerivedParameterCollection objects are equal if they contain the same DerivedParameter objects.

Parameters

other (object) –

add_required_parameter(derived_parameter)[source]

Adds derived_parameter to the collection, it raises an ValueError if a required parameter with the same name is already present in the collection.

Parameters

derived_parameter (DerivedParameter) –

get_derived_list()[source]

Implement lazy iteration through the contained parameter names.

Return type

List[DerivedParameter]