rloc.h
来自「LinPacker是一个优化矩形布局的工具」· C头文件 代码 · 共 83 行
H
83 行
/*************************************************************************** * Copyright (C) 2003 by ita * * tnagy@eleve.emn.fr * * * * This program is free software{}; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation{}; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/#include <vector>#include <iostream>#include <fstream>#include "empilement.h"using namespace std;typedef vector<rectangle> empilement;class Rloc{ private: vector <lieu> points; vector <pv> catalogue; vector <rectangle> temp; vector <empilement> vecteur; int limite; int nbRect; int population; int nombreLieux; int curseurE; short KeepR; short MutaR; void ajouterRect(int lo,int la,int xpos,int ypos,bool ori,int num); void actualiserPoints( int index); bool positionPossible(int numPosition ); bool superposition (int t1 , int t2); void Fitness(int k); void Mutation(int i); void Crossover(int k); int randomize(); int tab[6]; public: Rloc(); ~Rloc(); void insereRect(int lo,int la); void initialiser(int lim, int pop, int taille); void Iterer(); int getLimite(); int getTaille(); int getPopulation(); int getHauteur(); int getCrossR(); int getMutaR(); int getKeepR(); void SetRates(int keep,int muta); int *getTabRectangle( int i); void toStringPoints(); void toStringRloc(int i); void Reset();};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?