Awkward Array: ReducerMax Class Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ReducerMax Class Reference

Reducer algorithm that returns the maximum value. The identity is minus infinity or the smallest possible value. More...

`#include <Reducer.h>`

Inheritance diagram for ReducerMax:

## Public Member Functions
| ReducerMax (double initial_f64_, uint64_t initial_u64_, int64_t initial_i64_)
| ReducerMax ()
const std::string | name () const override
| Name of the reducer algorithm: `"max"`. More...
util::dtype | preferred_dtype () const override
| Data type to prefer, as a NumPy dtype, if the array has UnknownType. 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...
Public Member Functions inherited from Reducer
virtual const std::string | name () const =0
| Name of the reducer algorithm. More...
virtual util::dtype | preferred_dtype () const =0
| Data type to prefer, as a NumPy dtype, if the array has UnknownType. More...
virtual util::dtype | return_dtype (util::dtype given_dtype) const
| Return type for a `given_dtype` as a NumPy dtype. More...
virtual bool | returns_positions () const
| True if this reducer returns index positions; false otherwise. More...
virtual const std::shared_ptr< void > | apply_bool (const bool *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of boolean values. More...
virtual const std::shared_ptr< void > | apply_int8 (const int8_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of signed 8-bit integer values. More...
virtual const std::shared_ptr< void > | apply_uint8 (const uint8_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of unsigned 8-bit integer values. More...
virtual const std::shared_ptr< void > | apply_int16 (const int16_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of signed 16-bit integer values. More...
virtual const std::shared_ptr< void > | apply_uint16 (const uint16_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of unsigned 16-bit integer values. More...
virtual const std::shared_ptr< void > | apply_int32 (const int32_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of signed 32-bit integer values. More...
virtual const std::shared_ptr< void > | apply_uint32 (const uint32_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of unsigned 32-bit integer values. More...
virtual const std::shared_ptr< void > | apply_int64 (const int64_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of signed 64-bit integer values. More...
virtual const std::shared_ptr< void > | apply_uint64 (const uint64_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of unsigned 64-bit integer values. More...
virtual const std::shared_ptr< void > | apply_float32 (const float *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of 32-bit floating-point values. More...
virtual const std::shared_ptr< void > | apply_float64 (const double *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of 64-bit floating-point values. More...
virtual const std::shared_ptr< void > | apply_complex64 (const std::complex< float > *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of complex 32-bit floating-point values. More...
virtual const std::shared_ptr< void > | apply_complex128 (const std::complex< double > *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of complex 64-bit floating-point values. More...
virtual const std::shared_ptr< void > | apply_datetime (const int64_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of datetime values. More...
virtual const std::shared_ptr< void > | apply_timedelta (const int64_t *data, const Index64 &parents, int64_t outlength) const =0
| Apply the reducer algorithm to an array of timedelta values. More...

## Detailed Description

Reducer algorithm that returns the maximum value. The identity is minus infinity or the smallest possible value.

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.

ReducerMin and ReducerMax are exceptions to the no-state rule: they are parameterized by `initial`, used as an initial value in the minimization or maximization.

For the complex numbers array it returns the minimum absolute value (also known as norm, modulus, or magnitude) of a complex number.

## Constructor & Destructor Documentation

## ◆ ReducerMax() [1/2]

ReducerMax | ( | double | initial_f64_,
|  | uint64_t | initial_u64_,
|  | int64_t | initial_i64_
| ) |  |

## ◆ ReducerMax() [2/2]

ReducerMax | ( |  | ) |

## Member Function Documentation

## ◆ apply_bool()

const std::shared_ptr< void > apply_bool | ( | const bool * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of boolean values.

Parameters

  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.

## ◆ apply_complex128()

const std::shared_ptr< void > apply_complex128 | ( | const std::complex< double > * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of complex 64-bit floating-point values.

Parameters

  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.

## ◆ apply_complex64()

const std::shared_ptr< void > apply_complex64 | ( | const std::complex< float > * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of complex 32-bit floating-point values.

Parameters

  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.

## ◆ apply_datetime()

const std::shared_ptr< void > apply_datetime | ( | const int64_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of datetime values.

Parameters

  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.

## ◆ apply_float32()

const std::shared_ptr< void > apply_float32 | ( | const float * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of 32-bit floating-point values.

Parameters

  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.

## ◆ apply_float64()

const std::shared_ptr< void > apply_float64 | ( | const double * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of 64-bit floating-point values.

Parameters

  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.

## ◆ apply_int16()

const std::shared_ptr< void > apply_int16 | ( | const int16_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of signed 16-bit integer values.

Parameters

  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.

## ◆ apply_int32()

const std::shared_ptr< void > apply_int32 | ( | const int32_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of signed 32-bit integer values.

Parameters

  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.

## ◆ apply_int64()

const std::shared_ptr< void > apply_int64 | ( | const int64_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of signed 64-bit integer values.

Parameters

  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.

## ◆ apply_int8()

const std::shared_ptr< void > apply_int8 | ( | const int8_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of signed 8-bit integer values.

Parameters

  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.

## ◆ apply_timedelta()

const std::shared_ptr< void > apply_timedelta | ( | const int64_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of timedelta values.

Parameters

  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.

## ◆ apply_uint16()

const std::shared_ptr< void > apply_uint16 | ( | const uint16_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of unsigned 16-bit integer values.

Parameters

  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.

## ◆ apply_uint32()

const std::shared_ptr< void > apply_uint32 | ( | const uint32_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of unsigned 32-bit integer values.

Parameters

  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.

## ◆ apply_uint64()

const std::shared_ptr< void > apply_uint64 | ( | const uint64_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of unsigned 64-bit integer values.

Parameters

  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.

## ◆ apply_uint8()

const std::shared_ptr< void > apply_uint8 | ( | const uint8_t * | data,
|  | const Index64 & | parents,
|  | int64_t | outlength
| ) |  | const
| overridevirtual

Apply the reducer algorithm to an array of unsigned 8-bit integer values.

Parameters

  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.

## ◆ name()

const std::string name | ( |  | ) | const
| overridevirtual

Name of the reducer algorithm: `"max"`.

Implements Reducer.

## ◆ preferred_dtype()

util::dtype preferred_dtype | ( |  | ) | const
| overridevirtual

Data type to prefer, as a NumPy dtype, if the array has UnknownType.

The preferred type for ReducerMax is `double`.

Implements Reducer.

The documentation for this class was generated from the following file:

- include/awkward/Reducer.h