Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Аппроксимация выпуклой оболочки / SOURCE / List
.pas unit List;
interface
uses classes,WinTypes;
type
PAndList=^AList;
PMyList = ^AList;
AList=record
x:integer;
y:integer;
number:integer;
end;
ListP=class(Tlist)
protected
function GetPoint(index:integer):AList;
function GetPointAndr(index:integer;sp:Listp):AList;
public
property Points[index:integer]:AList read GetPoint;
property PointsAndr[index:integer;sp:Listp]:AList read GetPointAndr;
end;
var
MyList, MyList2, MyList3,UpList,AndrList,AndrDownList,AndrUpList: ListP;
Elem,Left,Right,ARecord,ARecord1,Arecord2:^Alist;
Implementation
function ListP.GetPoint(index:integer):AList;
begin
if index>count-1
then index:=index-count;
result:=AList(items[index]^);
end;
function ListP.GetPointAndr(index:integer;sp:Listp):AList;
begin
if index>sp.count-1
then index:=index-sp.count;
result:=AList(sp.items[index]^);
end;
end.
interface
uses classes,WinTypes;
type
PAndList=^AList;
PMyList = ^AList;
AList=record
x:integer;
y:integer;
number:integer;
end;
ListP=class(Tlist)
protected
function GetPoint(index:integer):AList;
function GetPointAndr(index:integer;sp:Listp):AList;
public
property Points[index:integer]:AList read GetPoint;
property PointsAndr[index:integer;sp:Listp]:AList read GetPointAndr;
end;
var
MyList, MyList2, MyList3,UpList,AndrList,AndrDownList,AndrUpList: ListP;
Elem,Left,Right,ARecord,ARecord1,Arecord2:^Alist;
Implementation
function ListP.GetPoint(index:integer):AList;
begin
if index>count-1
then index:=index-count;
result:=AList(items[index]^);
end;
function ListP.GetPointAndr(index:integer;sp:Listp):AList;
begin
if index>sp.count-1
then index:=index-sp.count;
result:=AList(sp.items[index]^);
end;
end.
Соседние файлы в папке SOURCE