Chemical Descriptors Library: adjacent_vertices_property_equals
Molecule Functors

adjacent_vertices_property_equals

Object type

Unary predicate

Description

The unary predicate returns true if the property of any of the ajacent atoms of a vertex equals the property value passed to the constructor of the predicate.

Prototype

  template <class Molecule, class PropSelector>
    struct adjacent_vertices_property_equals : std::unary_function<
        typename Molecule::vertex_descriptor
      , bool
    > {

      adjacent_vertices_property_equals(const value_type val_, const Molecule& m_) :
        value(val_), mol(m_) {}

      bool operator()(const typename Molecule::vertex_descriptor v) const;

    };

Associated types

type nameDescriptionmember type
value_type The type of the atom's property public

Definition

#include <morpho/cdl/molecule/functors/mol_ftors.hpp>

Preconditions

PropSelector is a valid atomic property selector.

Complexity

Linear. Worst case if the application of operator == for each of the adjacent atom's properties.

Example



References



Copyright © Vladimir Josef Sykora & Morphochem AG 2003
Copyright © Vladimir Josef Sykora 2003-2006