BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
BALL::ConnectedComponentsProcessor Class Reference

#include <BALL/STRUCTURE/connectedComponentsProcessor.h>

Inheritance diagram for BALL::ConnectedComponentsProcessor:
BALL::UnaryProcessor< AtomContainer > BALL::UnaryFunctor< AtomContainer, Processor::Result >

Public Types

Type definitions
typedef std::vector< Atom * > Component
 
typedef std::vector< ComponentComponentVector
 
- Public Types inherited from BALL::UnaryFunctor< AtomContainer, Processor::Result >
typedef Processor::Result result_type
 
typedef AtomContainer argument_type
 
typedef AtomContainerargument_reference
 
typedef const AtomContainerconst_argument_reference
 
typedef AtomContainerargument_pointer
 
typedef const AtomContainerconst_argument_pointer
 

Public Member Functions

 BALL_CREATE (ConnectedComponentsProcessor)
 
Constructors and Destructors
 ConnectedComponentsProcessor ()
 Default Constructor. More...
 
virtual ~ConnectedComponentsProcessor ()
 Destructor. More...
 
Processor-related methods
virtual bool start ()
 Processor method which is called before the operator()-call. More...
 
void clear ()
 
virtual Processor::Result operator() (AtomContainer &ac)
 
virtual bool finish ()
 Processor method which is called after the operator()-call. More...
 
Accessors.
Size getNumberOfConnectedComponents ()
 Return the number of connected components found. More...
 
ComponentVectorgetComponents ()
 Return the vector of connected components. More...
 
const ComponentVectorgetComponents () const
 Return the vector of connected components, const variant. More...
 
Size splitIntoMolecules (System &to_split)
 
- Public Member Functions inherited from BALL::UnaryProcessor< AtomContainer >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 

Protected Attributes

ComponentVector components_
 

Detailed Description

Connected Component ProcessorComputation of the connected components of the molecular graph.

Definition at line 20 of file connectedComponentsProcessor.h.

Member Typedef Documentation

Definition at line 27 of file connectedComponentsProcessor.h.

Definition at line 28 of file connectedComponentsProcessor.h.

Constructor & Destructor Documentation

BALL::ConnectedComponentsProcessor::ConnectedComponentsProcessor ( )

Default Constructor.

virtual BALL::ConnectedComponentsProcessor::~ConnectedComponentsProcessor ( )
virtual

Destructor.

Member Function Documentation

BALL::ConnectedComponentsProcessor::BALL_CREATE ( ConnectedComponentsProcessor  )
void BALL::ConnectedComponentsProcessor::clear ( )

Clears the data structures.

virtual bool BALL::ConnectedComponentsProcessor::finish ( )
virtual

Processor method which is called after the operator()-call.

Reimplemented from BALL::UnaryProcessor< AtomContainer >.

ComponentVector& BALL::ConnectedComponentsProcessor::getComponents ( )

Return the vector of connected components.

const ComponentVector& BALL::ConnectedComponentsProcessor::getComponents ( ) const

Return the vector of connected components, const variant.

Size BALL::ConnectedComponentsProcessor::getNumberOfConnectedComponents ( )

Return the number of connected components found.

virtual Processor::Result BALL::ConnectedComponentsProcessor::operator() ( AtomContainer ac)
virtual

Operator () for the processor

Reimplemented from BALL::UnaryProcessor< AtomContainer >.

Size BALL::ConnectedComponentsProcessor::splitIntoMolecules ( System to_split)

Split a System into its connected components.

This function inserts one Molecule per connected component into to_split. The Atoms will be re-parented and ripped out of their previous parents. Note that this destroys any further hierarchical organization (e.g. Chains, Fragments, ...) that was previously present.

This function will apply the connected component computation itself, so it is not necessary to call apply() previously.

Parameters
to_splitthe System to split
Returns
Size - the number of connected components
virtual bool BALL::ConnectedComponentsProcessor::start ( )
virtual

Processor method which is called before the operator()-call.

Reimplemented from BALL::UnaryProcessor< AtomContainer >.

Member Data Documentation

ComponentVector BALL::ConnectedComponentsProcessor::components_
protected

Definition at line 96 of file connectedComponentsProcessor.h.