Reducer algorithm that returns true
if any values are true
, false
otherwise. The identity is false
.
More...
#include <Reducer.h>
Public Member Functions | |
const std::string | name () const override |
Name of the reducer algorithm: "any" . More... | |
util::dtype | preferred_dtype () const override |
Data type to prefer, as a NumPy dtype, if the array has UnknownType. More... | |
util::dtype | return_dtype (util::dtype given_dtype) const override |
Return type for a given_dtype as a NumPy dtype. More... | |
const std::shared_ptr< void > | apply_bool (const bool *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of boolean values. More... | |
const std::shared_ptr< void > | apply_int8 (const int8_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of signed 8-bit integer values. More... | |
const std::shared_ptr< void > | apply_uint8 (const uint8_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of unsigned 8-bit integer values. More... | |
const std::shared_ptr< void > | apply_int16 (const int16_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of signed 16-bit integer values. More... | |
const std::shared_ptr< void > | apply_uint16 (const uint16_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of unsigned 16-bit integer values. More... | |
const std::shared_ptr< void > | apply_int32 (const int32_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of signed 32-bit integer values. More... | |
const std::shared_ptr< void > | apply_uint32 (const uint32_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of unsigned 32-bit integer values. More... | |
const std::shared_ptr< void > | apply_int64 (const int64_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of signed 64-bit integer values. More... | |
const std::shared_ptr< void > | apply_uint64 (const uint64_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of unsigned 64-bit integer values. More... | |
const std::shared_ptr< void > | apply_float32 (const float *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of 32-bit floating-point values. More... | |
const std::shared_ptr< void > | apply_float64 (const double *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of 64-bit floating-point values. More... | |
const std::shared_ptr< void > | apply_complex64 (const std::complex< float > *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of complex 32-bit floating-point values. More... | |
const std::shared_ptr< void > | apply_complex128 (const std::complex< double > *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of complex 64-bit floating-point values. More... | |
const std::shared_ptr< void > | apply_datetime (const int64_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of datetime values. More... | |
const std::shared_ptr< void > | apply_timedelta (const int64_t *data, const Index64 &parents, int64_t outlength) const override |
Apply the reducer algorithm to an array of timedelta values. More... | |
![]() | |
virtual bool | returns_positions () const |
True if this reducer returns index positions; false otherwise. More... | |
Reducer algorithm that returns true
if any values are true
, false
otherwise. The identity is false
.
Reducers have no parameters or state. They are classes for convenience, to separate Content::reduce_next, determining which values to combine, from the choice of reducer algorithm.
|
overridevirtual |
Apply the reducer algorithm to an array of boolean values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of complex 64-bit floating-point values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of complex 32-bit floating-point values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of datetime values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of 32-bit floating-point values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of 64-bit floating-point values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of signed 16-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of signed 32-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of signed 64-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of signed 8-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of timedelta values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of unsigned 16-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of unsigned 32-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of unsigned 64-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Apply the reducer algorithm to an array of unsigned 8-bit integer values.
data | The array to reduce. |
parents | An integer array indicating which group each element belongs to. |
outlength | The length of the output array (equal to the number of groups). |
Implements Reducer.
|
overridevirtual |
Name of the reducer algorithm: "any"
.
Implements Reducer.
|
overridevirtual |
Data type to prefer, as a NumPy dtype, if the array has UnknownType.
The preferred type for ReducerAny is boolean
.
Implements Reducer.
|
overridevirtual |
Return type for a given_dtype
as a NumPy dtype.
The return type for ReducerAny is boolean
.
Reimplemented from Reducer.