Chemical Descriptors Library: preserve_selected_vertices
Atom Functors

preserve_selected_vertices

Object type

Unary predicate

Description

The predicate returns true if the vertex is included in a container passed to the ctor of the predicate.
This predicate (actually, its utility ftor) is to be used for the get_filtered_graph() function of the molecule: it filters the vertices that are specified in a container.

Prototype

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

    preserve_selected_vertices(const std::vector<size_t>* v);

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

  };
And the utility functor :
  struct preserve_selected_vertices_factory {

    template <class Molecule>
    preserve_selected_vertices<Molecule>
    make_filter(const Molecule& ) const;

  };

Associated types

None

Definition

#include <morpho/cdl/atom/functors/atom_filters.hpp>

Preconditions

Complexity

Example



References



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