?? town.cpp
字號:
#include "town.h"
town::town()
{
townName = " ";
edges = NULL;
}
town::~town()
{
delete edges;
}
void town::setTownName(string townName_Info)
{
townName = townName_Info;
}
string town::getTownName()
{
return townName;
}
void town::setList(list* edges_Info)
{
edges = edges_Info;
}
list* town::getList()
{
return edges;
}
void town::setList(double* data, int size, int townsize)
{
edges = new list();
int index = 0;
for ( int j = 0; j < size; j++)
{
index += townsize - 1 - j;
}
for(int i = 0; i < townsize - size - 1; i++)
{
connection con;
con.setIndex_start(size);
con.setIndex_end(size + i +1);
con.setKm(data[index+i]);
edges->insert_in_order(con);
//edges.insert_in_order(
}
setList(edges);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -