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)

Add two DerivedParameterCollection objects.

__eq__(other)

Compare two DerivedParameterCollection objects for equality.

__iter__()

Implementation of lazy iteration through the collection.

add_required_parameter(derived_parameter)

Adds derived_parameter to the collection.

get_derived_list()

Implement lazy iteration through the contained parameter names.


__add__(other)[source]#

Add two DerivedParameterCollection objects.

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 (None | 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) –

__iter__()[source]#

Implementation of lazy iteration through the collection.

Return type:

Iterator[tuple[str, str, float]]

add_required_parameter(derived_parameter)[source]#

Adds derived_parameter to the collection.

We 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]