KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
A functor that serves as the identity function. More...
#include <set_identity_function.h>
Public Member Functions | |
TDataType & | operator() (TDataType &data) |
Operator that returns a non-const reference to the input object. More... | |
const TDataType & | operator() (const TDataType &data) const |
Operator that returns a const reference to the input object. More... | |
A functor that serves as the identity function.
This class provides two overloaded operator() functions, one for non-const objects and another for const objects. The operator() returns the input object as it is, effectively acting as an identity function. The purpose of this functor is to allow objects to be used as keys in sets or other containers that require comparison. By using this functor, you can avoid defining custom comparison functions or operators when the object itself can be considered for comparison.
TDataType | The data type of the object that the functor operates on. |
|
inline |
Operator that returns a const reference to the input object.
data | The input object of type TDataType. |
|
inline |
Operator that returns a non-const reference to the input object.
data | The input object of type TDataType. |