libbio
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
bio::Affinity Class Reference

#include <Affinity.h>

Inheritance diagram for bio::Affinity:
Inheritance graph
[legend]
Collaboration diagram for bio::Affinity:
Collaboration graph
[legend]

Public Types

typedef physical::Attraction< bool >::Force Strength
 

Public Member Functions

 Affinity ()
 
virtual ~Affinity ()
 
virtual Strength GetStrengthOfAttractionTo (Pointer< const Wave > wave) const
 
virtual bool AttractionExists (Pointer< const Wave > wave, Strength threshold=0) const
 
virtual bool operator== (Pointer< const Wave > wave) const
 
- Public Member Functions inherited from bio::physical::Class< Affinity >
 Class (Pointer< Affinity > object, Pointer< Symmetry > symmetry=NULL)
 
 Class (Pointer< Affinity > object, SymmetryFactory symmetryFactory)
 
 Class (const Class &other)
 
virtual ~Class ()
 
virtual Pointer< AffinityGetWaveObject ()
 
virtual Pointer< const AffinityGetWaveObject () const
 
virtual operator Affinity & ()
 
virtual operator const Affinity & () const
 
virtual Pointer< WaveClone () const
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual operator Pointer< Wave > ()
 
- Public Member Functions inherited from bio::physical::Wave
 Wave (Pointer< Symmetry > symmetry=NULL)
 
 Wave (const Wave &other)
 
Waveoperator= (const Wave &other)
 
virtual ~Wave ()
 
virtual Properties GetProperties () const
 
virtual Pointer< const SymmetrySpin () const
 
Pointer< const SymmetryGetSymmetry () const
 
virtual Code Reify (Pointer< const Symmetry > symmetry)
 
virtual bool Superpose (Pointer< const Wave > displacement, Pointer< Interference > pattern)
 
virtual Pointer< WaveSuperpose (const ConstWaves &displacement, Pointer< Interference > pattern)
 
virtual Pointer< WaveModulate (Pointer< Wave > signal)
 
virtual Pointer< WaveDemodulate ()
 
virtual Pointer< const WaveDemodulate () const
 
virtual Code Attenuate (Pointer< const Wave > other)
 
virtual Code Disattenuate (Pointer< const Wave > other)
 
Pointer< WaveAsWave ()
 
Pointer< const WaveAsWave () const
 
virtual Pointer< chemical::AtomAsAtom ()
 
virtual Pointer< const chemical::AtomAsAtom () const
 
virtual void operator| (Pointer< Symmetry > symmetry)
 
virtual Pointer< Waveoperator* (Pointer< Wave > signal)
 
virtual Pointer< Waveoperator* ()
 
virtual Pointer< const Waveoperator* () const
 
virtual void operator+ (Pointer< const Wave > other)
 
virtual void operator- (Pointer< const Wave > other)
 
uint16_t GetTypeId () const
 
void SetTypeId (uint16_t typeId)
 

Additional Inherited Members

- Static Public Member Functions inherited from bio::physical::Class< Affinity >
static Pointer< AffinityConvert (Pointer< Wave > wave)
 
- Static Public Member Functions inherited from bio::physical::Wave
static Properties GetResonanceBetween (ConstWaves waves)
 
static Properties GetResonanceBetween (Pointer< const Wave > wave1, Pointer< const Wave > wave2)
 
static Properties GetResonanceBetween (Pointer< const Wave > wave, const Properties &properties)
 
- Protected Attributes inherited from bio::physical::Class< Affinity >
Pointer< AffinitymObject
 
- Protected Attributes inherited from bio::physical::Wave
LazyPointer< SymmetrymSymmetry
 
bool mHasSignal
 
uint16_t mTypeId
 

Detailed Description

Affinity is simply a base class for further Affinity specification.
They allow you to build a selector that can be compared against Waves later.
Unlike Wave::GetResonanceBetween(), Affinity can be either positive or negative and can change what is being compared.

NOTE: Affinity is in the main bio namespace for ease of use across domains.

Member Typedef Documentation

◆ Strength

Sync the template-specific Attraction Force with our non-specific Affinity Strength.
bool here is simply a dummy value.

Constructor & Destructor Documentation

◆ Affinity()

bio::Affinity::Affinity ( )

Ensure virtual methods point to Class implementations.

◆ ~Affinity()

bio::Affinity::~Affinity ( )
virtual

Member Function Documentation

◆ AttractionExists()

bool bio::Affinity::AttractionExists ( Pointer< const Wave wave,
Affinity::Strength  threshold = 0 
) const
virtual

Abstract; will always return false unless GetStrengthOfAttractionTo is overridden.

Parameters
wave
thresholdhow high the Affinity::Strength must be to return true.
Returns
whether or not the Affinity::Strength of interacting with the wave is greater than the threshold.

◆ GetStrengthOfAttractionTo()

Affinity::Strength bio::Affinity::GetStrengthOfAttractionTo ( Pointer< const Wave wave) const
virtual

To get the Affinity::Strength of an interaction, we add all Attraction::Forces together.
Here, negative Attractions (i.e. repulsions) will cause the Affinity to be weaker (i.e. smaller) or negative.
"Abstract"; will always return 0 unless overridden.

Parameters
wave
Returns
the sum of all Attractions between *this and the wave.

◆ operator==()

bool bio::Affinity::operator== ( Pointer< const Wave wave) const
virtual

Ease of use wrapper for AttractionExists().

Parameters
wave
Returns
whether or not AttractionExists between *this and wave.

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