![]() |
NDEVR
API Documentation
|
An boolean specifc Vector which stores vectors of bools in optimal space. More...
Public Member Functions | |
| constexpr | Vector (const bool &prefix, const Vector< t_dims - 1, bool > &vector) |
| Creates a vector where the prefix scaler is combined with the suffix vector. | |
| constexpr | Vector (const bool &prefix_a, const bool &prefix_b, const Vector< t_dims - 1, bool > &vector) |
| Vectors. | |
| constexpr | Vector (const bool &value) |
| Sets values in each dimension to the value in the passed in scaler. | |
| constexpr | Vector (const bool &x, const bool &y) |
| Sets values in each dimension to the respective value in the passed in scaler. | |
| constexpr | Vector (const bool &x, const bool &y, const bool &z) |
| Sets values in each dimension to the respective value in the passed in scaler. | |
| constexpr | Vector (const bool &x, const bool &y, const bool &z, const bool &w) |
| Sets values in each dimension to the respective value in the passed in scaler. | |
| constexpr | Vector (const bool(&vector)[t_dims]) |
| Given a container of statically determined array, transforms it to a vector. | |
| constexpr | Vector (const Vector< getMax(t_dims - 2, 0), bool > &vector, const bool &suffix_a, const bool &suffix_b) |
| Creates a vector where the prefix vector is combined with the suffix scalers. | |
| constexpr | Vector (const Vector< t_dims - 1, bool > &vector, const bool &suffix) |
| Vectors. | |
| template<class t_vec_type> | |
| constexpr | Vector (const Vector< t_dims, t_vec_type > &vector) |
| Copy constructor. | |
| template<uint01 t_new_dim, class t_new_type> | |
| constexpr Vector< t_new_dim, t_new_type > | as (t_new_type extra_fill_value=0) const |
| As the given extra fill value. | |
| constexpr uint01 | dimensionalIndex () const |
| Used with template arguments MAX or MIN, Gets the dimensional index for the value that is either max or min. | |
| constexpr bool | dimensionalValue () const |
| Used with template arguments MAX or MIN, Gets the dimensional value for the value that is either max or min. | |
| constexpr t_magnitude_type | magnitude () const |
| Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism. | |
| constexpr bool | magnitudeSquared () const |
| Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism. | |
| constexpr Vector< t_dims, t_norm_type > | normalized (Vector< t_dims, t_norm_type > value_if_nan=Constant< Vector< t_dims, t_norm_type > >::Invalid) const |
| Gets the normalized, or unit length representation of this vector. | |
| constexpr | operator bool () const |
| For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1. | |
| constexpr | operator bool & () |
| For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1. | |
| constexpr Vector< t_dims, bool > | operator- () const |
| Negation operator. | |
| constexpr Vector< t_dims, bool > & | operator= (const bool &scaler) |
| Assignment operator. | |
| constexpr Vector< t_dims, bool > & | operator= (const Vector< t_dims, bool > &vector) |
| Assignment operator. | |
| constexpr BitReference | operator[] (uint01 dimension_index) |
| Accesses the value of a certain dimension. | |
| constexpr bool | product () const |
| Returns the product, or value of each dimension multiplied together. | |
| constexpr bool | sum () const |
| Returns the sum, or value of each dimension added together. | |
Static Public Member Functions | |
| static constexpr uint01 | NumberOfDimensions () |
| Number of dimensions in this vector class. | |
| static constexpr bool | Type () |
| Returns the type of this class. | |
Protected Attributes | |
| BitFlag | m_values [(t_dims/8)+(t_dims % 8==0 ? 0 :1)] |
| The values[t dims]. | |
An boolean specifc Vector which stores vectors of bools in optimal space.
t_dims: The number of dimensions used in a vector.
Definition at line 44 of file BoolVector.hpp.
|
inlineconstexpr |
Copy constructor.
Author: Tyler Parke
Date: 2017-11-13
Parameters: vector - The vector to copy to this vector.
Definition at line 64 of file BoolVector.hpp.
|
inlineexplicitconstexpr |
Sets values in each dimension to the value in the passed in scaler.
Author: Tyler Parke
Date: 2017-09-13
Parameters: scaler - The bool to set all dimensions to.
Definition at line 81 of file BoolVector.hpp.
|
inlineconstexpr |
Sets values in each dimension to the respective value in the passed in scaler.
Note the Vector must be 2 dimensions to use this function.
Author: Tyler Parke
Date: 2017-09-13
Parameters: x - The bool to set the 0th or X dimension to y - The bool to set the 1st or Y dimension to
Definition at line 119 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
Sets values in each dimension to the respective value in the passed in scaler.
Note the Vector must be 3 dimensions to use this function.
| [in] | x | - The bool to set the 0th or X dimension to |
| [in] | y | - The bool to set the 1st or Y dimension to |
| [in] | z | - The bool to set the 2nd or Z dimension to |
Definition at line 133 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
Sets values in each dimension to the respective value in the passed in scaler.
Note the Vector must be 4 dimensions to use this function.
| [in] | x | - The bool to set the 0th or X dimension to |
| [in] | y | - The bool to set the 1st or Y dimension to |
| [in] | z | - The bool to set the 2nd or Z dimension to |
| [in] | w | - The bool to set the 3rd or W dimension to |
Definition at line 149 of file BoolVector.hpp.
References m_values.
|
inlineexplicitconstexpr |
Given a container of statically determined array, transforms it to a vector.
| [in] | vector | - The vector container object. |
Definition at line 162 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
Vectors.
Creates a vector where the prefix vector is combined with the suffix boolean.
| [in] | vector | - The vector. |
| [in] | suffix | A boolean to append to the given vector |
Definition at line 173 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
Creates a vector where the prefix vector is combined with the suffix scalers.
| [in] | vector | - The vector. |
| [in] | postfix_a | - The postfix a. |
| [in] | postfix_b | - The postfix b. |
Definition at line 187 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
Creates a vector where the prefix scaler is combined with the suffix vector.
| [in] | prefix | The prefix. |
| [in] | vector | The vector. |
Definition at line 201 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
Vectors.
Creates a vector where the prefix scaler values are combined with the suffix vector.
| [in] | prefix_a | - The first prefix. |
| [in] | prefix_b | - The second prefix. |
| [in] | vector | - The vector. |
Definition at line 214 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
As the given extra fill value.
| [in] | extra_fill_value | - (Optional) The extra fill value, or value to set dimensions extra that may be created when t_new_dim > t_dim. |
Definition at line 230 of file BoolVector.hpp.
Used with template arguments MAX or MIN, Gets the dimensional index for the value that is either max or min.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 392 of file Vector.hpp.
|
inlinenodiscardconstexpr |
Used with template arguments MAX or MIN, Gets the dimensional value for the value that is either max or min.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 362 of file Vector.hpp.
|
inlineconstexpr |
Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism.
Calculating the magnitude of vectors is essential for all sorts of problems where forces collide.
Magnitude is defined as the length of a vector. The notation for absolute value. Thus magnitude is the same as length of vector.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 470 of file Vector.hpp.
|
inlinenodiscardconstexpr |
Vectors are commonly used to model forces such as wind, sea current, gravity, and electromagnetism.
Calculating the magnitude of vectors is essential for all sorts of problems where forces collide.
Magnitude is defined as the length of a vector. The notation for absolute value. Thus magnitude is the same as length of vector.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 448 of file Vector.hpp.
|
inlineconstexpr |
Gets the normalized, or unit length representation of this vector.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 486 of file Vector.hpp.
|
inlinestaticconstexpr |
Number of dimensions in this vector class.
Definition at line 339 of file BoolVector.hpp.
For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1.
Definition at line 249 of file BoolVector.hpp.
References m_values.
|
inlineconstexpr |
For Single dimensional objects, they may also be considered a scaler, thus allow implicit conversion from a vector to a scaler when the dimension of the vector is 1.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 423 of file Vector.hpp.
|
inlineconstexpr |
Negation operator.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 576 of file Vector.hpp.
|
inlineconstexpr |
Assignment operator.
Setes all values to the value provided in scaler argument.
| [in] | scaler | The scaler to set each dimension to. |
Definition at line 296 of file BoolVector.hpp.
|
inlineconstexpr |
Assignment operator.
| [in] | vector | - The vector to set this vector to. |
Definition at line 284 of file BoolVector.hpp.
References Vector< t_dims, t_type >::m_values, and m_values.
|
inlineconstexpr |
Accesses the value of a certain dimension.
| [in] | dimension_index | - The dimensional index of the the value we wish to retrieve. |
Definition at line 263 of file BoolVector.hpp.
References m_values.
|
inlinenodiscardconstexpr |
Returns the product, or value of each dimension multiplied together.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 510 of file Vector.hpp.
|
inlinenodiscardconstexpr |
Returns the sum, or value of each dimension added together.
Author: Tyler Parke
Date: 2017-11-13
Definition at line 527 of file Vector.hpp.
Returns the type of this class.
Useful for using decltype to instantiate a member of this class in a static environment.
Definition at line 346 of file BoolVector.hpp.