diplib/library/dimension_array.h file

The dip::DimensionArray template class. This file is always included through diplib.h. See Support types.

Contents

Classes

template<typename T>
class dip::DimensionArray
A dynamic array type optimized for few elements.

Functions

template<typename T>
void dip::sortIndices(dip::DimensionArray& indices, dip::DimensionArray const& data)
Sorts the indices array with indices into the data array, from smallest to largest. The sort is stable.
template<typename T>
auto dip::SquareDistance(dip::DimensionArray const& v1, dip::DimensionArray const& v2) -> double
Computes the Square Euclidean distance between two points.
template<typename T>
auto dip::Distance(dip::DimensionArray const& v1, dip::DimensionArray const& v2) -> double
Computes the Square Euclidean distance between two points.

Operators

template<typename T>
auto dip::operator==(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and contain the same values.
template<typename T>
auto dip::operator!=(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true if they have different size and/or contain different values.
template<typename T>
auto dip::operator>(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are larger than all rhs elements.
template<typename T>
auto dip::operator<(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are smaller than all rhs elements.
template<typename T>
auto dip::operator>=(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are larger or equal than all rhs elements.
template<typename T>
auto dip::operator<=(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are smaller or equal than all rhs elements.
template<typename T>
auto dip::operator==(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto dip::operator!=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto dip::operator>(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto dip::operator<(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto dip::operator>=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto dip::operator<=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto dip::operator<<(std::ostream& os, dip::DimensionArray const& array) -> std::ostream&
Writes the array to a stream