spectrapacket.cpp
33 lines
| 678 B
| text/x-c
|
CppLexer
/ rmapplugin / spectrapacket.cpp
r45 | #include "spectrapacket.h" | |||
SpectraPacket::SpectraPacket(QObject *parent, unsigned int size) : | ||||
QObject(parent) | ||||
{ | ||||
unsigned int i; | ||||
this->nbSamples = size; | ||||
// | ||||
s11 = (float*) malloc(sizeof(float) * size); | ||||
s22 = (float*) malloc(sizeof(float) * size); | ||||
s33 = (float*) malloc(sizeof(float) * size); | ||||
s44 = (float*) malloc(sizeof(float) * size); | ||||
s55 = (float*) malloc(sizeof(float) * size); | ||||
for (i=0; i< size; i++) | ||||
{ | ||||
s11[i] = 0.; | ||||
s22[i] = 0.; | ||||
s33[i] = 0.; | ||||
s44[i] = 0.; | ||||
s55[i] = 0.; | ||||
} | ||||
} | ||||
SpectraPacket::~SpectraPacket() | ||||
{ | ||||
free(s11); | ||||
free(s22); | ||||
free(s33); | ||||
free(s44); | ||||
free(s55); | ||||
} | ||||