storage.h

来自「使用LDA实现三维模型相关反馈的算法注:1、使用本系统必须在本地计算机上安装ma」· C头文件 代码 · 共 73 行

H
73
字号
#pragma once
#include <vector>
#include <map>
#include <fstream>
#include "global.h"



//struct modellabel 
//{
//	int modelnumber;
//	int label;
//};


class CStorage
{
public:
	CStorage(void);
	~CStorage(void);
	//int totalclassnumber;
	//int totalmodelnumber;
	//std::vector<int> modelinclassnumber;
	//记录每个类中的模型个数

	//std::vector< std::vector<int> > allclassvector;
	//记录了所有的类别,以及每个类别的模型序号

	//用来临时记录一个类别中的所有模型序号
	//std::vector<int> oneclassvector;
	bool readalllabelsfromfile(CString infilepath);



	//double* origindistancevector;
	//double* newdistancevector;



	//int currentmodel;//当前正在处理的模型
	bool readallfeaturesfromfile(CString infilepath);
	bool initvariables(void);
	int labelnumber;

	//std::map< double, std::vector<int> > distancemap;
	//std::map< double, std::vector<int> >::iterator iterdistance;

	bool computedistance(int modelnumber);
	//std::map<int,int> labelvector;
	//std::vector< int > labelvectorpositive;
	//std::vector< int > labelvectornegative;

	bool labelretrieval(int currentclass);
	bool computenewfeaturematrix();
	bool computedistancenew(int modelnumber);

	std::ofstream outfile0;
	std::ofstream outfile1;
	std::ofstream outfile2;
	std::ofstream outfile3;
	std::ofstream outfile4;
	std::ofstream outfile5;
	std::ofstream outfile6;
	std::ofstream outfile7;
	std::ofstream outfile8;
	std::ofstream outfile9;

private:
	double distancetrans[OBJECTNUMBER];
	int nearestobjects[RETURNBACKNUM];

};

⌨️ 快捷键说明

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