1
0
Fork 0

Removing more unnecessary files

This commit is contained in:
pigmonkey 2011-05-30 19:39:14 -04:00
parent 3ad7ead089
commit 31fad88493
3 changed files with 0 additions and 1038 deletions

View File

@ -1,109 +0,0 @@
PriorityQueue = {
size = 0,
heap = {},
cmp = function(a,b) return a<b end;
};
local PriorityQueue = PriorityQueue;
local function deepcopy(dst, src)
for k,v in pairs(src) do
if (type(v) == "table") then
dst[k] = {};
deepcopy(dst[k], v);
else
dst[k] = v;
end
end
end
-- ---------------------------
-- ----------- API -----------
-- ---------------------------
-- local pq = PriorityQueue:New();
-- local pq = PriorityQueue:New{ default=1, values=2 };
function PriorityQueue:New(init)
local pq = {};
deepcopy(pq, self);
if (init) then
for k,v in pairs(init) do
table.insert(pq.heap, {key=k, val=v});
pq.size = pq.size + 1;
end
for i=#pq.heap,1,-1 do
pq:PushDown(i);
end
end
return pq;
end
-- pq:Insert(key, priority);
function PriorityQueue:Insert(key, value)
if (not key or not value) then
error("Usage - myPriorityQueue:Insert(key, value);");
end
local i = self.size+1;
local parent = floor(i/2);
if (type(self.heap[i]) == "table") then
self.heap[i].key = key;
self.heap[i].val = value;
else
self.heap[i] = {key=key, val=value};
end
self.size = self.size + 1;
while (parent>0 and self:Compare(i, parent)) do
self:Swap(i, parent);
i = parent;
parent = floor(i/2);
end
end
-- local next = pq:Peek();
function PriorityQueue:Peek()
if (self.size <= 0) then
return nil;
end
local node = self.heap[1];
return node.key, node.val;
end
-- local next = pq:Remove();
function PriorityQueue:Remove()
if (self.size <= 0) then
return nil;
end
self:Swap(1, self.size);
self:PushDown(1);
self.size = self.size - 1;
local node = self.heap[self.size+1];
return node.key, node.val;
end
-- ---------------------------
-- ------ Class Methods ------
-- ---------------------------
function PriorityQueue:PushDown(index)
local lc = index*2;
local rc = lc + 1;
if (lc <= self.size) then
if (rc <= self.size and self:Compare(rc, lc)) then
rc = lc;
end
if (self:Compare(lc, index)) then
self:Swap(lc, index);
end
end
end
function PriorityQueue:Swap(i, j)
local temp = self.heap[i];
self.heap[i] = self.heap[j];
self.heap[j] = temp;
end
function PriorityQueue:Compare(i, j)
return self.cmp(self.heap[i].val, self.heap[j].val);
end

View File

@ -1,46 +0,0 @@
TextRegistry = {
pos = {x=0, y=0},
dispRegistry = {},
openTexts = 0,
numTexts = 0,
};
local TextRegistry = TextRegistry;
-- =================================
-- API
-- =================================
function TextRegistry:Unlock(callback)
self.anchorFrame:SetBackdropColor(0.1, 0.1, 0.1, 0.75);
self.anchorFrame:EnableMouse(true);
end
function TextRegistry:Lock()
end
-- TextRegistry:SetPosition - sets (x,y) coordinates of the frame; also accepts a table with x and y keys
function TextRegistry:SetPosition(x, y)
if (type(x) == "table") then
y = x.y or 0;
x = x.x or 0;
end
local s = self.anchorFrame:GetEffectiveScale();
end
function TextRegistry:GetPosition()
return self.pos.x, self.pos.y;
end
function TextRegistry:AddText(id, text, color)
end
function TextRegistry:UpdateText(id, val, color)
end
function TextRegistry:ClearAllTexts()
end

View File

@ -1,883 +0,0 @@
TRANSITIVES = {
"abandon",
"absorb",
"abstract",
"abuse",
"accept",
"access",
"accommodate",
"accompany",
"ache for",
"achieve",
"acknowledge",
"act",
"add",
"address",
"adjust",
"admit",
"adopt",
"advance",
"advertise",
"advocate",
"affect",
"afford",
"affright",
"aggregate",
"aim",
"alarm",
"allocate",
"ally",
"alter",
"amaze",
"ambuscade",
"amplify",
"analyse",
"analyze",
"anticipate",
"appall",
"appeal",
"apply",
"appoint",
"appreciate",
"approach",
"appropriate",
"approve",
"arrange",
"ascend",
"ascribe",
"ashame",
"assemble",
"assess",
"assign",
"associate",
"assume",
"assure",
"attach",
"attack",
"attempt",
"attract",
"attribute",
"authorise",
"authorize",
"avoid",
"awake",
"award",
"axe",
"back",
"background",
"badge",
"bake",
"balance",
"ball",
"ban",
"bare",
"bargain",
"base",
"batter",
"battle",
"beam",
"bear",
"beat",
"become",
"begin",
"believe",
"bench",
"bend",
"best",
"bet",
"bias",
"bid",
"bill",
"bind",
"bite",
"black",
"blame",
"blast",
"blaze",
"bless",
"blind",
"block",
"blow",
"board",
"bog",
"boil",
"bomb",
"bond",
"book",
"bore",
"borrow",
"boss",
"bother",
"bottle",
"bow",
"bowl",
"box",
"bracket",
"breach",
"break",
"break down",
"breast",
"brief",
"bring",
"broom",
"budget",
"bug",
"bugger",
"build",
"bully",
"bump",
"bunch",
"buoy",
"burden",
"burgle",
"burst",
"bury",
"bus",
"busy",
"butcher",
"buy",
"cake",
"calculate",
"call",
"calm",
"can",
"cancel",
"cap",
"captain",
"capture",
"card",
"carpet",
"carry",
"cash",
"cast",
"catch",
"cater",
"cause",
"cease",
"celebrate",
"center",
"centre",
"challenge",
"chamber",
"channel",
"charge",
"chart",
"chase",
"cheat",
"check",
"cheer",
"cheer up",
"chip",
"choose",
"chop",
"claim",
"clean",
"click",
"climb",
"clobber",
"close",
"clothe",
"club",
"coach",
"cock",
"coin",
"collar",
"collect",
"combine",
"comfort",
"command",
"commence",
"comment",
"commission",
"commit",
"compact",
"compare",
"complement",
"complete",
"complicate",
"compound",
"comprise",
"compute",
"conceive",
"concern",
"conduct",
"confer",
"confine",
"confuse",
"congregate",
"connect",
"consider",
"construct",
"consult",
"consume",
"contact",
"contain",
"content",
"continue",
"contract",
"contrast",
"contribute",
"control",
"convert",
"convey",
"cook",
"cool",
"copyright",
"core",
"corrupt",
"cost",
"count",
"couple",
"court",
"crane",
"crash",
"create",
"credit",
"cripple",
"crisp",
"crook",
"crop",
"crowd",
"cure",
"cycle",
"dam",
"damage",
"damn",
"dash",
"date",
"deal",
"debate",
"debut",
"decide",
"declare",
"decline",
"decorate",
"decrease",
"dedicate",
"defeat",
"delay",
"delegate",
"delight",
"deliver",
"demand",
"demonize",
"demonstrate",
"demoralise",
"demoralize",
"denote",
"deny",
"derive",
"descend",
"describe",
"design",
"desolate",
"detect",
"develop",
"devote",
"diagram",
"dice",
"dig",
"dim",
"diminish",
"direct",
"disable",
"disappoint",
"discipline",
"discover",
"discuss",
"disjoin",
"disperse",
"dissolve",
"distort",
"distract",
"disturb",
"disunite",
"ditch",
"divide",
"divorce",
"dock",
"doctor",
"document",
"dog",
"dominate",
"dot",
"double",
"doubt",
"draft",
"drag",
"dress",
"drink",
"drive",
"driving",
"drug",
"dry",
"duct tape",
"dump",
"dust",
"dye",
"ease",
"eat",
"elbow",
"eliminate",
"embarrass",
"emphasize",
"employ",
"enable",
"encounter",
"encourage",
"endanger",
"engage",
"engineer",
"enjoy",
"ensure",
"enter",
"entitle",
"envision",
"equal",
"equip",
"eschew",
"essay",
"establish",
"estimate",
"evaluate",
"evolve",
"ex",
"exact",
"examine",
"exceed",
"except",
"excite",
"excuse",
"exercise",
"expand",
"expect",
"expel",
"expend",
"explain",
"explode",
"explore",
"extend",
"extract",
"facilitate",
"familiarise",
"familiarize",
"fan",
"fancy",
"fashion",
"fault",
"fear",
"feature",
"feed",
"feel",
"fetch",
"field",
"figure",
"file",
"fill",
"film",
"filter",
"finance",
"find",
"fine",
"finger",
"finish",
"fire",
"fit",
"fix",
"flame",
"flap",
"flatter",
"flavor",
"flavour",
"fly",
"focus",
"fog",
"follow",
"fool",
"foot",
"forbid",
"forget",
"format",
"forward",
"fox",
"free",
"freeze",
"frighten",
"fringe",
"fry",
"fuck",
"fumble",
"fund",
"gangbang",
"gas",
"gather",
"generate",
"google",
"govern",
"grab",
"graduate",
"greet",
"ground",
"grow",
"grudge",
"guarantee",
"guaranty",
"guard",
"guess",
"hail",
"halt",
"harm",
"hate",
"hawk",
"head",
"hearing",
"hide",
"highlight",
"hit",
"hold",
"hop",
"host",
"house",
"hunt",
"hurry",
"hurt",
"identify",
"ignite",
"ignore",
"illuminate",
"illustrate",
"imagine",
"imply",
"impose",
"impress",
"improve",
"include",
"index",
"indicate",
"induce",
"industrialise",
"industrialize",
"infer",
"inform",
"initiate",
"input",
"insert",
"inspect",
"install",
"institute",
"instruct",
"insult",
"insure",
"intend",
"interpret",
"interrupt",
"introduce",
"invade",
"invest",
"investigate",
"invite",
"involve",
"irritate",
"issue",
"jack",
"jacket",
"join",
"jolly",
"juice",
"jump",
"justify",
"kick",
"know",
"label",
"labor",
"labour",
"lack",
"land",
"lay",
"lease",
"leave",
"lend",
"libel",
"light",
"limit",
"link",
"list",
"load",
"lose",
"machine",
"mail",
"maintain",
"manage",
"maneuver",
"manoeuvre",
"market",
"master",
"match",
"mate",
"matriculate",
"mean",
"measure",
"meet",
"mention",
"meow",
"merge",
"microwave",
"midwife",
"milk",
"mine",
"minimise",
"minimize",
"mirror",
"misbehave",
"mistake",
"misunderstand",
"model",
"moderate",
"modify",
"mold",
"mop",
"mortgage",
"mother",
"motivate",
"mould",
"move",
"muck",
"mug",
"multiply",
"name",
"napalm",
"narrow",
"needle",
"neglect",
"negotiate",
"nominate",
"notice",
"notify",
"nurse",
"oblige",
"obscure",
"observe",
"obtain",
"occasion",
"occupy",
"offset",
"ok",
"okay",
"omen",
"opaque",
"operate",
"oppose",
"oppress",
"order",
"organise",
"organize",
"output",
"oxidize",
"pack",
"pad",
"page",
"pair",
"paragraph",
"park",
"part",
"partner",
"pass",
"pat",
"patch",
"pattern",
"pay",
"people",
"perceive",
"perfect",
"persuade",
"phase",
"photo",
"photograph",
"pick",
"picture",
"piece",
"pile",
"pimp",
"place",
"plan",
"plane",
"pledge",
"plug",
"poison",
"polish",
"poll",
"portion",
"position",
"post",
"pound",
"powder",
"power",
"practice",
"pray",
"precede",
"predicate",
"predict",
"prefer",
"prepare",
"present",
"press",
"presume",
"prevent",
"prime",
"print",
"prize",
"process",
"produce",
"profit",
"program",
"programme",
"project",
"promote",
"propose",
"prospect",
"prove",
"provide",
"punctuate",
"punish",
"purchase",
"purge",
"pursue",
"push",
"puzzle",
"qualify",
"quarter",
"radio",
"raise",
"reach",
"realise",
"realize",
"rear",
"reason",
"recall",
"receive",
"reckon",
"recommend",
"recover",
"recruit",
"reduce",
"refer",
"referred",
"reflect",
"refrigerate",
"refuse",
"regard",
"register",
"regularize",
"regulate",
"reject",
"relate",
"relax",
"remark",
"remedy",
"remember",
"remind",
"remove",
"rent",
"repair",
"repeat",
"repel",
"replace",
"reply",
"report",
"research",
"reserve",
"resist",
"restore",
"restrict",
"restructure",
"retain",
"retire",
"return",
"reveal",
"revenge",
"reverse",
"revise",
"revolt",
"reward",
"rid",
"rival",
"rub",
"rubbish",
"rumor",
"rush",
"salt",
"sample",
"saw",
"scapegoat",
"scare",
"schedule",
"scold",
"scope",
"scream",
"season",
"seat",
"section",
"seek",
"select",
"sentence",
"serve",
"set",
"settle",
"shadow",
"shape",
"share",
"shave",
"shed",
"shift",
"shine",
"shit",
"shore",
"shout",
"show",
"shower",
"shylock",
"sicken",
"signal",
"sing",
"sink",
"sit",
"site",
"size",
"sketch",
"slather",
"slide",
"slow",
"smash",
"smoke",
"snake",
"soap",
"sock",
"sod",
"solve",
"sought",
"space",
"spare",
"spawn",
"specify",
"spend",
"spit",
"split",
"sponsor",
"spot",
"staff",
"stake out",
"stall",
"state",
"stimulate",
"stock",
"stole",
"stomach",
"store",
"strengthen",
"stress",
"strike",
"strip",
"stripe",
"study",
"subject",
"subjugate",
"submit",
"subordinate",
"sue",
"supply",
"suppress",
"survey",
"survive",
"suspect",
"suspend",
"sustain",
"swallow",
"swap",
"swarm",
"swing",
"switch",
"tackle",
"tag",
"tail",
"take",
"take up",
"tape",
"taste",
"tax",
"teach",
"team",
"tell",
"tend",
"term",
"terminate",
"test",
"thin",
"think",
"throw",
"throw away",
"thump",
"ticket",
"tickle",
"tidy",
"tie",
"tile",
"time",
"tip",
"total",
"touch",
"tough",
"tour",
"trace",
"track",
"trail",
"train",
"transfer",
"translate",
"transmit",
"trap",
"treasure",
"treat",
"trust",
"try",
"tune",
"turn",
"tutor",
"type",
"undergo",
"underlie",
"undertake",
"undo",
"unify",
"urge",
"vacuum",
"vary",
"vassal",
"venerate",
"vent",
"violate",
"visualize",
"vote",
"wage",
"wake up",
"wank",
"want",
"ward",
"water",
"waterlog",
"weaken",
"wear",
"weigh",
"wet",
"whale",
"will",
"win",
"wire",
"withdraw",
"witness",
"wonder",
"wound",
"wreck",
"wrestle",
"write",
"wrong",
};