3.1.9. c3po.CollaborativeDataManager module

Inheritance diagram of c3po.CollaborativeDataManager

Contain the class CollaborativeDataManager.

class c3po.CollaborativeDataManager.CollaborativeDataManager(dataManagers)

Bases: DataManager, CollaborativeObject

CollaborativeDataManager is a DataManager that handles a set of DataManager as a single one.

__add__(other)

Return self + other.

Use "+" to call it. For example a = b + c.

Parameters:

other (CollaborativeDataManager) – A CollaborativeDataManager with the same list of data than self.

Returns:

A new (consistent with self) CollaborativeDataManager where the data are added.

Return type:

CollaborativeDataManager

Raises:

Exception – If self and other are not consistent.

__iadd__(other)

Add other in self (in place addition).

Use "+=" to call it. For example a += b.

Parameters:

other (CollaborativeDataManager) – A CollaborativeDataManager with the same list of data than self.

Returns:

self.

Return type:

CollaborativeDataManager

Raises:

Exception – If self and other are not consistent.

__imul__(scalar)

Multiply self by scalar (in place multiplication).

Use "*=" to call it. For example a *= b.

Parameters:

scalar – A scalar value.

Returns:

self.

Return type:

CollaborativeDataManager

__init__(dataManagers)

Build a CollaborativeDataManager object.

Parameters:

dataManagers (list[DataManager]) – A list of DataManager.

__isub__(other)

Substract other to self (in place subtraction).

Use "-=" to call it. For example a -= b.

Parameters:

other (CollaborativeDataManager) – A CollaborativeDataManager with the same list of data than self.

Returns:

self.

Return type:

CollaborativeDataManager

Raises:

Exception – If self and other are not consistent.

__mul__(scalar)

Return scalar * self.

Use "*" to call it. For example a = b * c. The scalar first.

Parameters:

scalar – A scalar value.

Returns:

A new (consistent with self) CollaborativeDataManager where the data are multiplied by scalar.

Return type:

CollaborativeDataManager

__sub__(other)

Return self - other.

Use "-" to call it. For example a = b - c.

Parameters:

other (CollaborativeDataManager) – A CollaborativeDataManager with the same list of data than self.

Returns:

A new (consistent with self) CollaborativeDataManager where the data are substracted.

Return type:

CollaborativeDataManager

Raises:

Exception – If self and other are not consistent.

checkBeforeOperator(other)

INTERNAL Make basic checks before the call of an operator.

clone()

Return a clone of self.

Returns:

A clone of self. Data are copied.

Return type:

CollaborativeDataManager

cloneEmpty()

Return a clone of self without copying the data.

Returns:

An empty clone of self.

Return type:

CollaborativeDataManager

copy(other)

Copy data of other in self.

Parameters:

other (CollaborativeDataManager) – A CollaborativeDataManager with the same list of data than self.

Raises:

Exception – If self and other are not consistent.

dot(other)

Return the scalar product of self with other.

Parameters:

other (CollaborativeDataManager) – A CollaborativeDataManager with the same list of data than self.

Return type:

The scalar product of self with other.

Raises:

Exception – If self and other are not consistent.

ignoreForConstOperators(indexToIgnore)

INTERNAL

imuladd(scalar, other)

Add in self scalar * other (in place operation).

In order to do so, other *= scalar and other *= 1./scalar are done.

For example a.imuladd(b, c).

Parameters:
Returns:

self.

Return type:

CollaborativeDataManager

Raises:

Exception – If self and other are not consistent.

norm2()

Return the norm 2.

Returns:

  • sqrt(sum_i(val[i] * val[i])) where val[i] stands for each scalar and each

  • component of the MED fields.

normMax()

Return the infinite norm.

Return type:

The max of the absolute values of the scalars and of the infinite norms of the MED fields.