ARTS  2.2.66
m_reduce.h File Reference

Implementation of Reduce. More...

#include "array.h"
#include "exceptions.h"
#include "matpackVII.h"
#include <cstring>

Go to the source code of this file.

Functions

Index num_elem_from_dim_sizes (const ArrayOfIndex &dim_sizes)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Vector &type)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Matrix &type)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Tensor3 &type)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Tensor4 &type)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Tensor5 &type)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Tensor6 &type)
 
void select_dims_by_size (ArrayOfIndex &dim_sizes, const Index min_num_elem, const Tensor7 &type)
 
void Reduce (Numeric &o, const Vector &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Numeric &o, const Matrix &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Numeric &o, const Tensor3 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Numeric &o, const Tensor4 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Numeric &o, const Tensor5 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Numeric &o, const Tensor6 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Numeric &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Vector &o, const Matrix &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Vector &o, const Tensor3 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Vector &o, const Tensor4 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Vector &o, const Tensor5 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Vector &o, const Tensor6 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Vector &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Matrix &o, const Tensor3 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Matrix &o, const Tensor4 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Matrix &o, const Tensor5 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Matrix &o, const Tensor6 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Matrix &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor3 &o, const Tensor4 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor3 &o, const Tensor5 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor3 &o, const Tensor6 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor3 &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor4 &o, const Tensor5 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor4 &o, const Tensor6 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor4 &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor5 &o, const Tensor6 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor5 &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 
void Reduce (Tensor6 &o, const Tensor7 &i, const Verbosity &)
 WORKSPACE METHOD: Reduce. More...
 

Detailed Description

Implementation of Reduce.

Author
Richard Larsson ric.l.nosp@m.arss.nosp@m.on@gm.nosp@m.ail..nosp@m.com
Date
Wed Feb 25 2014

This file contains the implementation of the supergeneric method Reduce.

Definition in file m_reduce.h.

Function Documentation

◆ num_elem_from_dim_sizes()

Index num_elem_from_dim_sizes ( const ArrayOfIndex dim_sizes)

Definition at line 43 of file m_reduce.h.

Referenced by Reduce().

◆ Reduce() [1/28]

void Reduce ( Matrix o,
const Tensor3 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 505 of file m_reduce.h.

References MatrixView::get_c_array(), Tensor3View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Matrix::resize(), and select_dims_by_size().

◆ Reduce() [2/28]

void Reduce ( Matrix o,
const Tensor4 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 537 of file m_reduce.h.

References MatrixView::get_c_array(), Tensor4View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Matrix::resize(), and select_dims_by_size().

◆ Reduce() [3/28]

void Reduce ( Matrix o,
const Tensor5 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 569 of file m_reduce.h.

References MatrixView::get_c_array(), Tensor5View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Matrix::resize(), and select_dims_by_size().

◆ Reduce() [4/28]

void Reduce ( Matrix o,
const Tensor6 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 601 of file m_reduce.h.

References MatrixView::get_c_array(), Tensor6View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Matrix::resize(), and select_dims_by_size().

◆ Reduce() [5/28]

void Reduce ( Matrix o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 633 of file m_reduce.h.

References MatrixView::get_c_array(), Tensor7View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Matrix::resize(), and select_dims_by_size().

◆ Reduce() [6/28]

void Reduce ( Numeric o,
const Matrix i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 172 of file m_reduce.h.

References ConstMatrixView::ncols(), and ConstMatrixView::nrows().

◆ Reduce() [7/28]

void Reduce ( Numeric o,
const Tensor3 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 193 of file m_reduce.h.

References ConstTensor3View::ncols(), ConstTensor3View::npages(), and ConstTensor3View::nrows().

◆ Reduce() [8/28]

void Reduce ( Numeric o,
const Tensor4 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 215 of file m_reduce.h.

References ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstTensor4View::npages(), and ConstTensor4View::nrows().

◆ Reduce() [9/28]

void Reduce ( Numeric o,
const Tensor5 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 238 of file m_reduce.h.

References ConstTensor5View::nbooks(), ConstTensor5View::ncols(), ConstTensor5View::npages(), ConstTensor5View::nrows(), and ConstTensor5View::nshelves().

◆ Reduce() [10/28]

void Reduce ( Numeric o,
const Tensor6 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 262 of file m_reduce.h.

References ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), and ConstTensor6View::nvitrines().

◆ Reduce() [11/28]

void Reduce ( Numeric o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 287 of file m_reduce.h.

References ConstTensor7View::nbooks(), ConstTensor7View::ncols(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nrows(), ConstTensor7View::nshelves(), and ConstTensor7View::nvitrines().

◆ Reduce() [12/28]

void Reduce ( Numeric o,
const Vector i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 152 of file m_reduce.h.

References ConstVectorView::nelem().

Referenced by Reduce_sg_MatrixTensor3_g(), Reduce_sg_MatrixTensor4_g(), Reduce_sg_MatrixTensor5_g(), Reduce_sg_MatrixTensor6_g(), Reduce_sg_MatrixTensor7_g(), Reduce_sg_NumericMatrix_g(), Reduce_sg_NumericTensor3_g(), Reduce_sg_NumericTensor4_g(), Reduce_sg_NumericTensor5_g(), Reduce_sg_NumericTensor6_g(), Reduce_sg_NumericTensor7_g(), Reduce_sg_NumericVector_g(), Reduce_sg_Tensor3Tensor4_g(), Reduce_sg_Tensor3Tensor5_g(), Reduce_sg_Tensor3Tensor6_g(), Reduce_sg_Tensor3Tensor7_g(), Reduce_sg_Tensor4Tensor5_g(), Reduce_sg_Tensor4Tensor6_g(), Reduce_sg_Tensor4Tensor7_g(), Reduce_sg_Tensor5Tensor6_g(), Reduce_sg_Tensor5Tensor7_g(), Reduce_sg_Tensor6Tensor7_g(), Reduce_sg_VectorMatrix_g(), Reduce_sg_VectorTensor3_g(), Reduce_sg_VectorTensor4_g(), Reduce_sg_VectorTensor5_g(), Reduce_sg_VectorTensor6_g(), and Reduce_sg_VectorTensor7_g().

◆ Reduce() [13/28]

void Reduce ( Tensor3 o,
const Tensor4 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 668 of file m_reduce.h.

References Tensor3View::get_c_array(), Tensor4View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor3::resize(), and select_dims_by_size().

◆ Reduce() [14/28]

void Reduce ( Tensor3 o,
const Tensor5 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 701 of file m_reduce.h.

References Tensor3View::get_c_array(), Tensor5View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor3::resize(), and select_dims_by_size().

◆ Reduce() [15/28]

void Reduce ( Tensor3 o,
const Tensor6 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 734 of file m_reduce.h.

References Tensor3View::get_c_array(), Tensor6View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor3::resize(), and select_dims_by_size().

◆ Reduce() [16/28]

void Reduce ( Tensor3 o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 767 of file m_reduce.h.

References Tensor3View::get_c_array(), Tensor7View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor3::resize(), and select_dims_by_size().

◆ Reduce() [17/28]

void Reduce ( Tensor4 o,
const Tensor5 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 803 of file m_reduce.h.

References Tensor4View::get_c_array(), Tensor5View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor4::resize(), and select_dims_by_size().

◆ Reduce() [18/28]

void Reduce ( Tensor4 o,
const Tensor6 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 837 of file m_reduce.h.

References Tensor4View::get_c_array(), Tensor6View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor4::resize(), and select_dims_by_size().

◆ Reduce() [19/28]

void Reduce ( Tensor4 o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 871 of file m_reduce.h.

References Tensor4View::get_c_array(), Tensor7View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor4::resize(), and select_dims_by_size().

◆ Reduce() [20/28]

void Reduce ( Tensor5 o,
const Tensor6 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 908 of file m_reduce.h.

References Tensor5View::get_c_array(), Tensor6View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor5::resize(), and select_dims_by_size().

◆ Reduce() [21/28]

void Reduce ( Tensor5 o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 943 of file m_reduce.h.

References Tensor5View::get_c_array(), Tensor7View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor5::resize(), and select_dims_by_size().

◆ Reduce() [22/28]

void Reduce ( Tensor6 o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 981 of file m_reduce.h.

References Tensor6View::get_c_array(), Tensor7View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Tensor6::resize(), and select_dims_by_size().

◆ Reduce() [23/28]

void Reduce ( Vector o,
const Matrix i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 316 of file m_reduce.h.

References VectorView::get_c_array(), MatrixView::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Vector::resize(), and select_dims_by_size().

◆ Reduce() [24/28]

void Reduce ( Vector o,
const Tensor3 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 347 of file m_reduce.h.

References VectorView::get_c_array(), Tensor3View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Vector::resize(), and select_dims_by_size().

◆ Reduce() [25/28]

void Reduce ( Vector o,
const Tensor4 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 378 of file m_reduce.h.

References VectorView::get_c_array(), Tensor4View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Vector::resize(), and select_dims_by_size().

◆ Reduce() [26/28]

void Reduce ( Vector o,
const Tensor5 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 409 of file m_reduce.h.

References VectorView::get_c_array(), Tensor5View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Vector::resize(), and select_dims_by_size().

◆ Reduce() [27/28]

void Reduce ( Vector o,
const Tensor6 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 440 of file m_reduce.h.

References VectorView::get_c_array(), Tensor6View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Vector::resize(), and select_dims_by_size().

◆ Reduce() [28/28]

void Reduce ( Vector o,
const Tensor7 i,
const Verbosity verbosity 
)

WORKSPACE METHOD: Reduce.

Reduces a larger class to a smaller class of same size.

The Reduce command reduces all "1"-dimensions to nil. Examples: 1) 1 Vector can be reduced to a Numeric 2) 2x1 Matrix can be reduced to 2 Vector 3) 1x3x1 Tensor3 can be reduced to 3 Vector 4) 1x1x1x1 Tensor4 can be reduced to a Numeric 5) 3x1x4x1x5 Tensor5 can only be reduced to 3x4x5 Tensor3 6) 1x1x1x1x2x3 Tensor6 can be reduced to 2x3 Matrix 7) 2x3x4x5x6x7x1 Tensor7 can be reduced to 2x3x4x5x6x7 Tensor6 And so on

Author
Oliver Lemke
Richard Larsson
Parameters
[out]oSupergeneric output
[in]iGeneric Input

Definition at line 471 of file m_reduce.h.

References VectorView::get_c_array(), Tensor7View::get_c_array(), Array< base >::nelem(), num_elem_from_dim_sizes(), Vector::resize(), and select_dims_by_size().

◆ select_dims_by_size() [1/7]

void select_dims_by_size ( ArrayOfIndex dim_sizes,
const Index  min_num_elem,
const Matrix type 
)

Definition at line 65 of file m_reduce.h.

References ConstMatrixView::ncols(), and ConstMatrixView::nrows().

◆ select_dims_by_size() [2/7]

void select_dims_by_size ( ArrayOfIndex dim_sizes,
const Index  min_num_elem,
const Tensor3 type 
)

◆ select_dims_by_size() [3/7]

void select_dims_by_size ( ArrayOfIndex dim_sizes,
const Index  min_num_elem,
const Tensor4 type 
)

◆ select_dims_by_size() [4/7]

void select_dims_by_size ( ArrayOfIndex dim_sizes,
const Index  min_num_elem,
const Tensor5 type 
)

◆ select_dims_by_size() [5/7]

void select_dims_by_size ( ArrayOfIndex dim_sizes,
const Index  min_num_elem,
const Tensor6 type 
)

◆ select_dims_by_size() [6/7]

◆ select_dims_by_size() [7/7]

void select_dims_by_size ( ArrayOfIndex dim_sizes,
const Index  min_num_elem,
const Vector type 
)

Definition at line 55 of file m_reduce.h.

References ConstVectorView::nelem().

Referenced by Reduce().