Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
core::optimization::Particle Class Reference

Simple data container for PSO algorithm. More...

#include <ParticleSwarmMinimizer.hh>

Inheritance diagram for core::optimization::Particle:
Inheritance graph
[legend]
Collaboration diagram for core::optimization::Particle:
Collaboration graph
[legend]

Public Member Functions

 Particle (Size size)
 
 Particle (Multivec const &p_in)
 
virtual ~Particle ()
 
Real score (Multifunc &f)
 
Real set_score (Real &new_score)
 
void ensure_size (Size minsize)
 Make sure that all arrays are large enough – prevents index-out-of-bound errors. More...
 
Multivec const & pbest () const
 This is why data should be private: you get to ensure it's valid when you read it. More...
 
Real fitness_pbest () const
 

Public Attributes

Multivec p_
 
Real fitness_
 
Multivec v_
 

Private Attributes

bool best_valid_
 
Multivec pbest_
 
Real fitness_pbest_
 

Detailed Description

Simple data container for PSO algorithm.

Definition at line 33 of file ParticleSwarmMinimizer.hh.

Constructor & Destructor Documentation

core::optimization::Particle::Particle ( Size  size)
inline

Definition at line 37 of file ParticleSwarmMinimizer.hh.

core::optimization::Particle::Particle ( Multivec const &  p_in)
inline

Definition at line 46 of file ParticleSwarmMinimizer.hh.

virtual core::optimization::Particle::~Particle ( )
inlinevirtual

Definition at line 55 of file ParticleSwarmMinimizer.hh.

Member Function Documentation

void core::optimization::Particle::ensure_size ( Size  minsize)
inline

Make sure that all arrays are large enough – prevents index-out-of-bound errors.

Definition at line 84 of file ParticleSwarmMinimizer.hh.

References p_, pbest_, and v_.

Real core::optimization::Particle::fitness_pbest ( ) const
inline

Definition at line 100 of file ParticleSwarmMinimizer.hh.

References best_valid_, and fitness_pbest_.

Referenced by core::optimization::operator<<().

Multivec const& core::optimization::Particle::pbest ( ) const
inline

This is why data should be private: you get to ensure it's valid when you read it.

Definition at line 94 of file ParticleSwarmMinimizer.hh.

References best_valid_, and pbest_.

Real core::optimization::Particle::score ( Multifunc f)
inline

Definition at line 57 of file ParticleSwarmMinimizer.hh.

References best_valid_, fitness_, fitness_pbest_, p_, and pbest_.

Real core::optimization::Particle::set_score ( Real new_score)
inline

Definition at line 70 of file ParticleSwarmMinimizer.hh.

References best_valid_, fitness_, fitness_pbest_, p_, and pbest_.

Member Data Documentation

bool core::optimization::Particle::best_valid_
private

Definition at line 111 of file ParticleSwarmMinimizer.hh.

Referenced by fitness_pbest(), pbest(), score(), and set_score().

Real core::optimization::Particle::fitness_

Definition at line 107 of file ParticleSwarmMinimizer.hh.

Referenced by core::optimization::operator<<(), score(), and set_score().

Real core::optimization::Particle::fitness_pbest_
private

Definition at line 113 of file ParticleSwarmMinimizer.hh.

Referenced by fitness_pbest(), score(), and set_score().

Multivec core::optimization::Particle::p_
Multivec core::optimization::Particle::pbest_
private

Definition at line 112 of file ParticleSwarmMinimizer.hh.

Referenced by ensure_size(), pbest(), score(), and set_score().

Multivec core::optimization::Particle::v_

Definition at line 108 of file ParticleSwarmMinimizer.hh.

Referenced by ensure_size().


The documentation for this class was generated from the following file: