mlpack  git-master
HasNonConstSignatures< ClassType, CheckerA, SignatureA, ConstSignatureA, StaticSignatureA, CheckerB, SignatureB, ConstSignatureB, StaticSignatureB > Struct Template Reference

Utility struct: sometimes we want to know if we have two functions available, and that at least one of them is non-const and non-static. More...

Static Public Attributes

static const bool HasAnyFormA
 
static const bool HasAnyFormB
 
static const bool HasEitherNonConstForm
 
static const bool value = HasEitherNonConstForm && HasAnyFormA && HasAnyFormB
 

Detailed Description


template<typename ClassType, template< typename, template< typename... > class, size_t > class CheckerA, template< typename... > class SignatureA, template< typename... > class ConstSignatureA, template< typename... > class StaticSignatureA, template< typename, template< typename... > class, size_t > class CheckerB, template< typename... > class SignatureB, template< typename... > class ConstSignatureB, template< typename... > class StaticSignatureB>
struct mlpack::optimization::traits::HasNonConstSignatures< ClassType, CheckerA, SignatureA, ConstSignatureA, StaticSignatureA, CheckerB, SignatureB, ConstSignatureB, StaticSignatureB >

Utility struct: sometimes we want to know if we have two functions available, and that at least one of them is non-const and non-static.

If the corresponding checkers (from HAS_METHOD_FORM()) are given as CheckerA and CheckerB, and the corresponding non-const, const, and static function signatures are given as SignatureA, ConstSignatureA, StaticSignatureA, SignatureB, ConstSignatureB, and StaticSignatureB, then 'value' will be true if methods with the correct names exist in the given ClassType and at least one of those two methods is non-const and non-static.

Definition at line 280 of file traits.hpp.

Member Data Documentation

◆ HasAnyFormA

const bool HasAnyFormA
static
Initial value:
=
CheckerA<ClassType, SignatureA, 0>::value ||
CheckerA<ClassType, ConstSignatureA, 0>::value ||
CheckerA<ClassType, StaticSignatureA, 0>::value

Definition at line 283 of file traits.hpp.

◆ HasAnyFormB

const bool HasAnyFormB
static
Initial value:
=
CheckerB<ClassType, SignatureB, 0>::value ||
CheckerB<ClassType, ConstSignatureB, 0>::value ||
CheckerB<ClassType, StaticSignatureB, 0>::value

Definition at line 288 of file traits.hpp.

◆ HasEitherNonConstForm

const bool HasEitherNonConstForm
static
Initial value:
=
CheckerA<ClassType, SignatureA, 0>::value ||
CheckerB<ClassType, SignatureB, 0>::value

Definition at line 294 of file traits.hpp.

◆ value

const bool value = HasEitherNonConstForm && HasAnyFormA && HasAnyFormB
static

Definition at line 298 of file traits.hpp.


The documentation for this struct was generated from the following file:
  • /var/www/www.mlpack.org/mlpack-git/src/mlpack/core/optimizers/function/traits.hpp