⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_weightedsample.cpp

📁 一个很全的matlab工具包
💻 CPP
字号:
#include <sample/weightedsample.h>using namespace BFL;using namespace MatrixWrapper;#define DIMENSION 3int main(){  ColumnVector a(DIMENSION); a[0] = 1.0; a[1] = 0.1; a[2] = 1.0;    Sample<ColumnVector> my_first_sample;  WeightedSample<ColumnVector> my_first_weighted_sample;  my_first_sample.ValueSet(a);  my_first_weighted_sample.ValueSet(a);  WeightedSample<ColumnVector> my_second_weighted_sample(DIMENSION);  my_second_weighted_sample = my_first_sample;  my_first_weighted_sample.WeightSet(0.5);  cout << my_first_weighted_sample << endl;  cout << my_second_weighted_sample << endl;  int sample_val = 2;  WeightedSample<int> my_discrete_sample;  my_discrete_sample.ValueSet(sample_val);  my_discrete_sample.WeightSet(0.3);  cout << my_discrete_sample << endl;  cout << "test_weightedsample... done" << endl;  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -