Provides protected access to the Profile amplitudes array. More...

#include <ProfileAmps.h>

Inheritance diagram for Pulsar::ProfileAmps:
Pulsar::Container Reference::Able Reference::HeapTracked Pulsar::Profile

Classes

class  Expert
 Provides access to private and protected members of ProfileAmps. More...
 

Public Member Functions

 ProfileAmps (unsigned nbin=0)
 Constructor initializes the data array.
 
virtual ~ProfileAmps ()
 Destructor destroys the data array.
 
 ProfileAmps (const ProfileAmps &)
 Copy constructor.
 
unsigned get_nbin () const
 Return the number of bins.
 
virtual void resize (unsigned nbin)
 Resize the data area.
 
const float * get_amps () const
 Return a pointer to the amplitudes array.
 
float * get_amps ()
 Return a pointer to the amplitudes array.
 
template<typename T >
void set_amps (const T *data)
 set the amplitudes array equal to the contents of the data array More...
 
template<typename T >
void set_amps (const std::vector< T > &data)
 set the amplitudes array equal to the contents of the data array More...
 
template<typename T >
void get_amps (std::vector< T > &data) const
 set the amplitudes array equal to the contents of the data array More...
 
void remove (const std::vector< unsigned > &indeces)
 remove the elements specified in the array of indeces More...
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Static Public Attributes

static bool no_amps = false
 When true, no memory is allocated for amps. More...
 

Friends

class Expert
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Detailed Description

Provides protected access to the Profile amplitudes array.

By making the amps attribute private, all Profile methods must access the array through the get_amps method.

Member Function Documentation

◆ get_amps()

template<typename T >
void Pulsar::ProfileAmps::get_amps ( std::vector< T > &  data) const

set the amplitudes array equal to the contents of the data array

Parameters
datavector of amps

◆ remove()

void Pulsar::ProfileAmps::remove ( const std::vector< unsigned > &  indeces)

remove the elements specified in the array of indeces

remove the phase bins specified in the array of indeces

the indeces must be sorted and there must be no repeats

◆ set_amps() [1/2]

template<typename T >
void Pulsar::ProfileAmps::set_amps ( const std::vector< T > &  data)

set the amplitudes array equal to the contents of the data array

Parameters
datavector of amps

◆ set_amps() [2/2]

Member Data Documentation

◆ no_amps

bool Pulsar::ProfileAmps::no_amps = false
static

When true, no memory is allocated for amps.

Do not allocate memory for the amps

Referenced by Pulsar::Database::construct(), and Pulsar::Profile::Profile().


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

Generated using doxygen 1.8.17