33 #ifndef _NSOUND_KERNEL_H_
34 #define _NSOUND_KERNEL_H_
std::ostream & operator<<(std::ostream &out, const Buffer &rhs_buffer)
void ga_interleave()
Genitic Algorithm Helper Function: interleave B coefs with A.
std::set< Kernel > KernelCache
Kernel & operator=(const Kernel &rhs)
float64 getB(uint32 i)
Returns kernel 'b[i]' coef.
void setB(const float64 *b)
Copy getBLength() values from the array a into the Kernel. Use setLength() to set the number of value...
void setA(const float64 &d, uint32 i)
Set a_[i] = d.
float64 * getB()
Returns kernel 'b' array, the length is returned by getBLegnth()
boolean operator<(const Kernel &rhs) const
const float64 * getB() const
Returns kernel 'b' array, the length is returned by getBLegnth()
friend std::ostream & operator<<(std::ostream &out, const Kernel &rhs)
Prints the coeffents.
void ga_swap_ab(Kernel &rhs)
Genitic Algorithm Helper Function: swaps the A & B coefs.
void setLength(uint32 b_length, uint32 a_length)
uint32 getALength() const
void randomize(const float64 &min=-1.0, const float64 &max=1.0)
Sets all coefs to random float64 values between min & max.
uint32 getBLength() const
Kernel(uint32 b_length, uint32 a_length, int32 f1=0, int32 f2=0, int32 f3=0, int32 f4=0)
const float64 * getA() const
Returns Kernel 'a' array, the length is returned by getALegnth()
A Buffer for storing audio samples.
float64 * getA()
Returns Kernel 'a' array, the length is returned by getALegnth()
float64 getA(uint32 i)
Returns kernel 'a[i]' coef.
void setB(const float64 &d, uint32 i)
Set b_[i] = d.
void setA(const float64 *a)
Copy getALength() values from the array a into the Kernel. Use setLength() to set the number of value...