git-svn-id: svn://db.shs.com.ru/pip@471 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
105
main.cpp
105
main.cpp
@@ -83,37 +83,84 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#include "piframe.h"
|
||||
int main(int argc, char *argv[]) {
|
||||
PIString s("123");
|
||||
typedef PIString & MyT;
|
||||
MyT i(s);
|
||||
PIVariant v = PIVariant::fromValue(i);
|
||||
piCout << v << v.value<__PIVariantTypeInfo__<MyT>::PureType>();
|
||||
/*typedef PIString MyT;
|
||||
piCout << typeid(MyT).name();
|
||||
piCout << typeid(MyT&).name();
|
||||
piCout << typeid(const MyT).name();
|
||||
piCout << typeid(const MyT &).name();
|
||||
piCout << typeid(MyT*).name();
|
||||
piCout << typeid(const MyT*).name();
|
||||
piCout << "";
|
||||
piCout << typeid(TypeInfo<MyT>::PureType).name();
|
||||
piCout << typeid(TypeInfo<MyT&>::PureType).name();
|
||||
piCout << typeid(TypeInfo<const MyT>::PureType).name();
|
||||
piCout << typeid(TypeInfo<const MyT&>::PureType).name();
|
||||
piCout << typeid(TypeInfo<MyT*>::PureType).name();
|
||||
piCout << typeid(TypeInfo<const MyT*>::PureType).name();*/
|
||||
// v = PIVariant::fromValue(a);
|
||||
/*
|
||||
enum VCO_Aim_Type {VCO_Aim_Type_None, VCO_Aim_Type_Detected, VCO_Aim_Type_New, VCO_Aim_Type_Confirmed, VCO_Aim_Type_Deleted = 127};
|
||||
#pragma pack (push, 1)
|
||||
struct VCO_Element {
|
||||
VCO_Element() {}
|
||||
VCO_Aim_Type type;
|
||||
double elapsed;
|
||||
float wls_a; // m/s
|
||||
float wls_b; // m
|
||||
float speed;
|
||||
float acceleration; // m/s^2
|
||||
float prediction_pos; // m
|
||||
float variance; // m
|
||||
float power;
|
||||
float angle;
|
||||
int id;
|
||||
int missed;
|
||||
int missed_ml;
|
||||
int confirmed;
|
||||
int history_size;
|
||||
bool tracing;
|
||||
bool _found;
|
||||
bool _checked;
|
||||
bool _delete;
|
||||
PIVector<PIVector<double> > history;
|
||||
};
|
||||
#pragma pack (pop)
|
||||
struct VCO_ElementX {
|
||||
VCO_Aim_Type type;
|
||||
double elapsed;
|
||||
float wls_a; // m/s
|
||||
float wls_b; // m
|
||||
float speed;
|
||||
float acceleration; // m/s^2
|
||||
float prediction_pos; // m
|
||||
float variance; // m
|
||||
float power;
|
||||
float angle;
|
||||
int id;
|
||||
int missed;
|
||||
int missed_ml;
|
||||
int confirmed;
|
||||
int history_size;
|
||||
bool tracing;
|
||||
bool _found;
|
||||
bool _checked;
|
||||
bool _delete;
|
||||
};
|
||||
struct VCO_ElementY : VCO_ElementX {
|
||||
PIVector<PIVector<double> > history;
|
||||
};
|
||||
VCO_Element v;
|
||||
VCO_ElementX x;
|
||||
VCO_ElementY y;
|
||||
piCout << sizeof(x);
|
||||
piCout << sizeof(y) << sizeof(y.history) << sizeof(y) - sizeof(y.history) ;
|
||||
piCout << sizeof(v) << sizeof(v.history) << sizeof(v) - sizeof(v.history) ;
|
||||
return 0;*/
|
||||
|
||||
|
||||
// PIDiagnostics d;
|
||||
// piCout << d.receiveBytesPerSec();
|
||||
// piSleep(3);
|
||||
// piCout << d.receiveBytesPerSec();
|
||||
|
||||
// PIVector<float> in;
|
||||
// for (int i = 0; i < 50; ++i)
|
||||
// in << i%10;
|
||||
PIVector<PIVector<double> > in;
|
||||
in.resize(5);
|
||||
for (int i = 0; i < in.size_s(); ++i)
|
||||
for (int j = 0; j < 20; ++j)
|
||||
in[i] << j+i*100;
|
||||
// piCout << in.size() << in[0].size();
|
||||
PIFrame<double> f0;
|
||||
PIFrame<double> f1(30, 40);
|
||||
//in.resize(1);
|
||||
PIFrame<double> f2(in);
|
||||
f0 = f2;
|
||||
piCout << f0;
|
||||
piCout << f1;
|
||||
piCout << f2;
|
||||
piCout << f2.rows() << f2.cols() << f2.length() << f2.rows()*f2.cols();
|
||||
return 0;
|
||||
// PIFFTWf fft;
|
||||
// fft.preparePlan(50, PIFFTWf::foReal);
|
||||
// PIVector<complexf> out = fft.calcFFT(in);
|
||||
|
||||
Reference in New Issue
Block a user