dub 0.2.2 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dub might be problematic. Click here for more details.
- data/.gitignore +8 -0
- data/History.txt +32 -0
- data/LICENSE +20 -0
- data/README.rdoc +48 -0
- data/Rakefile +58 -0
- data/dub.gemspec +197 -0
- data/lib/dub/argument.rb +275 -0
- data/lib/dub/entities_unescape.rb +16 -0
- data/lib/dub/function.rb +163 -0
- data/lib/dub/function_group.rb +72 -0
- data/lib/dub/generator.rb +15 -0
- data/lib/dub/group.rb +24 -0
- data/lib/dub/klass.rb +231 -0
- data/lib/dub/lua/class.cpp.erb +83 -0
- data/lib/dub/lua/class_gen.rb +97 -0
- data/lib/dub/lua/function.cpp.erb +18 -0
- data/lib/dub/lua/function_gen.rb +258 -0
- data/lib/dub/lua/group.cpp.erb +9 -0
- data/lib/dub/lua/lua_cpp_helper.h +141 -0
- data/lib/dub/lua/namespace.cpp.erb +40 -0
- data/lib/dub/lua/namespace_gen.rb +88 -0
- data/lib/dub/lua.rb +24 -0
- data/lib/dub/member_extraction.rb +92 -0
- data/lib/dub/namespace.rb +277 -0
- data/lib/dub/parser.rb +46 -0
- data/lib/dub/templates/lua_template.erb +21 -0
- data/lib/dub/version.rb +3 -0
- data/lib/dub.rb +23 -20
- data/test/argument_test.rb +547 -0
- data/test/fixtures/app/CMakeLists.txt +54 -0
- data/test/fixtures/app/Doxyfile +1600 -0
- data/test/fixtures/app/bindings/all_lua.cpp +299 -0
- data/test/fixtures/app/include/matrix.h +140 -0
- data/test/fixtures/app/make_lua_bindings.rb +13 -0
- data/test/fixtures/app/vendor/lua/CMakeLists.txt +25 -0
- data/test/fixtures/app/vendor/lua/COPYRIGHT +34 -0
- data/test/fixtures/app/vendor/lua/HISTORY +183 -0
- data/test/fixtures/app/vendor/lua/INSTALL +99 -0
- data/test/fixtures/app/vendor/lua/Makefile +183 -0
- data/test/fixtures/app/vendor/lua/README +37 -0
- data/test/fixtures/app/vendor/lua/lapi.c +1080 -0
- data/test/fixtures/app/vendor/lua/lapi.h +16 -0
- data/test/fixtures/app/vendor/lua/lauxlib.c +653 -0
- data/test/fixtures/app/vendor/lua/lauxlib.h +174 -0
- data/test/fixtures/app/vendor/lua/lbaselib.c +643 -0
- data/test/fixtures/app/vendor/lua/lcode.c +839 -0
- data/test/fixtures/app/vendor/lua/lcode.h +76 -0
- data/test/fixtures/app/vendor/lua/ldblib.c +397 -0
- data/test/fixtures/app/vendor/lua/ldebug.c +622 -0
- data/test/fixtures/app/vendor/lua/ldebug.h +33 -0
- data/test/fixtures/app/vendor/lua/ldo.c +516 -0
- data/test/fixtures/app/vendor/lua/ldo.h +57 -0
- data/test/fixtures/app/vendor/lua/ldump.c +164 -0
- data/test/fixtures/app/vendor/lua/lfunc.c +174 -0
- data/test/fixtures/app/vendor/lua/lfunc.h +34 -0
- data/test/fixtures/app/vendor/lua/lgc.c +711 -0
- data/test/fixtures/app/vendor/lua/lgc.h +110 -0
- data/test/fixtures/app/vendor/lua/liblua.a +0 -0
- data/test/fixtures/app/vendor/lua/linit.c +38 -0
- data/test/fixtures/app/vendor/lua/liolib.c +532 -0
- data/test/fixtures/app/vendor/lua/llex.c +461 -0
- data/test/fixtures/app/vendor/lua/llex.h +81 -0
- data/test/fixtures/app/vendor/lua/llimits.h +128 -0
- data/test/fixtures/app/vendor/lua/lmathlib.c +263 -0
- data/test/fixtures/app/vendor/lua/lmem.c +86 -0
- data/test/fixtures/app/vendor/lua/lmem.h +49 -0
- data/test/fixtures/app/vendor/lua/loadlib.c +664 -0
- data/test/fixtures/app/vendor/lua/lobject.c +214 -0
- data/test/fixtures/app/vendor/lua/lobject.h +381 -0
- data/test/fixtures/app/vendor/lua/lopcodes.c +102 -0
- data/test/fixtures/app/vendor/lua/lopcodes.h +268 -0
- data/test/fixtures/app/vendor/lua/loslib.c +244 -0
- data/test/fixtures/app/vendor/lua/lparser.c +1337 -0
- data/test/fixtures/app/vendor/lua/lparser.h +82 -0
- data/test/fixtures/app/vendor/lua/lstate.c +214 -0
- data/test/fixtures/app/vendor/lua/lstate.h +168 -0
- data/test/fixtures/app/vendor/lua/lstring.c +111 -0
- data/test/fixtures/app/vendor/lua/lstring.h +31 -0
- data/test/fixtures/app/vendor/lua/lstrlib.c +868 -0
- data/test/fixtures/app/vendor/lua/ltable.c +588 -0
- data/test/fixtures/app/vendor/lua/ltable.h +40 -0
- data/test/fixtures/app/vendor/lua/ltablib.c +278 -0
- data/test/fixtures/app/vendor/lua/ltm.c +75 -0
- data/test/fixtures/app/vendor/lua/ltm.h +54 -0
- data/test/fixtures/app/vendor/lua/lua.c +695 -0
- data/test/fixtures/app/vendor/lua/lua.h +385 -0
- data/test/fixtures/app/vendor/lua/lua_dub_helper.h +77 -0
- data/test/fixtures/app/vendor/lua/luac +0 -0
- data/test/fixtures/app/vendor/lua/luac.c +200 -0
- data/test/fixtures/app/vendor/lua/luaconf.h +762 -0
- data/test/fixtures/app/vendor/lua/lualib.h +53 -0
- data/test/fixtures/app/vendor/lua/lundump.c +223 -0
- data/test/fixtures/app/vendor/lua/lundump.h +36 -0
- data/test/fixtures/app/vendor/lua/lvm.c +765 -0
- data/test/fixtures/app/vendor/lua/lvm.h +36 -0
- data/test/fixtures/app/vendor/lua/lzio.c +82 -0
- data/test/fixtures/app/vendor/lua/lzio.h +67 -0
- data/test/fixtures/app/vendor/lua/matrix.h +102 -0
- data/test/fixtures/app/vendor/lua/print.c +227 -0
- data/test/fixtures/app/vendor/lua/test/README +26 -0
- data/test/fixtures/app/vendor/lua/test/bisect.lua +27 -0
- data/test/fixtures/app/vendor/lua/test/cf.lua +16 -0
- data/test/fixtures/app/vendor/lua/test/echo.lua +5 -0
- data/test/fixtures/app/vendor/lua/test/env.lua +7 -0
- data/test/fixtures/app/vendor/lua/test/factorial.lua +32 -0
- data/test/fixtures/app/vendor/lua/test/fib.lua +40 -0
- data/test/fixtures/app/vendor/lua/test/fibfor.lua +13 -0
- data/test/fixtures/app/vendor/lua/test/globals.lua +13 -0
- data/test/fixtures/app/vendor/lua/test/hello.lua +3 -0
- data/test/fixtures/app/vendor/lua/test/life.lua +111 -0
- data/test/fixtures/app/vendor/lua/test/luac.lua +7 -0
- data/test/fixtures/app/vendor/lua/test/printf.lua +7 -0
- data/test/fixtures/app/vendor/lua/test/readonly.lua +12 -0
- data/test/fixtures/app/vendor/lua/test/sieve.lua +29 -0
- data/test/fixtures/app/vendor/lua/test/sort.lua +66 -0
- data/test/fixtures/app/vendor/lua/test/table.lua +12 -0
- data/test/fixtures/app/vendor/lua/test/trace-calls.lua +32 -0
- data/test/fixtures/app/vendor/lua/test/trace-globals.lua +38 -0
- data/test/fixtures/app/vendor/lua/test/xd.lua +14 -0
- data/test/fixtures/app/xml/classdub_1_1_matrix.xml +281 -0
- data/test/fixtures/app/xml/classdub_1_1_t_mat.xml +233 -0
- data/test/fixtures/app/xml/combine.xslt +15 -0
- data/test/fixtures/app/xml/compound.xsd +814 -0
- data/test/fixtures/app/xml/dir_53661a2bdeb1d55e60581a7e15deb763.xml +12 -0
- data/test/fixtures/app/xml/index.xml +44 -0
- data/test/fixtures/app/xml/index.xsd +66 -0
- data/test/fixtures/app/xml/matrix_8h.xml +157 -0
- data/test/fixtures/app/xml/namespacedub.xml +41 -0
- data/test/fixtures/classcv_1_1_mat.xml +1996 -0
- data/test/fixtures/classcv_1_1_point__.xml +341 -0
- data/test/fixtures/classcv_1_1_scalar__.xml +269 -0
- data/test/fixtures/classcv_1_1_size__.xml +270 -0
- data/test/fixtures/dummy_class.cpp.erb +1 -0
- data/test/fixtures/dummy_function.cpp.erb +1 -0
- data/test/fixtures/group___magic_type.xml +406 -0
- data/test/fixtures/namespacecv.xml +12659 -0
- data/test/function_group_test.rb +24 -0
- data/test/function_test.rb +395 -0
- data/test/group_test.rb +155 -0
- data/test/helper.rb +34 -0
- data/test/klass_test.rb +387 -0
- data/test/lua_function_gen_test.rb +195 -0
- data/test/namespace_test.rb +220 -0
- data/test/parser_test.rb +36 -0
- metadata +211 -275
- checksums.yaml +0 -7
- data/lib/open_api_sdk/analytics.rb +0 -99
- data/lib/open_api_sdk/domains.rb +0 -353
- data/lib/open_api_sdk/dub.rb +0 -88
- data/lib/open_api_sdk/links.rb +0 -766
- data/lib/open_api_sdk/metatags.rb +0 -54
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +0 -27
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/color.rb +0 -24
- data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/createdomain_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +0 -95
- data/lib/open_api_sdk/models/operations/createlink_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +0 -32
- data/lib/open_api_sdk/models/operations/createtag_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/data.rb +0 -83
- data/lib/open_api_sdk/models/operations/deletedomain_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletedomain_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletelink_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletelink_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/event.rb +0 -21
- data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +0 -33
- data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getlinks_request.rb +0 -51
- data/lib/open_api_sdk/models/operations/getlinks_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +0 -48
- data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getmetatags_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/getmetatags_response.rb +0 -33
- data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +0 -30
- data/lib/open_api_sdk/models/operations/getqrcode_request.rb +0 -39
- data/lib/open_api_sdk/models/operations/getqrcode_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/gettags_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getworkspace_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/getworkspace_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/groupby.rb +0 -28
- data/lib/open_api_sdk/models/operations/interval.rb +0 -25
- data/lib/open_api_sdk/models/operations/level.rb +0 -21
- data/lib/open_api_sdk/models/operations/listdomains_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/paymentprocessor.rb +0 -20
- data/lib/open_api_sdk/models/operations/requestbody.rb +0 -95
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +0 -81
- data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/sort.rb +0 -20
- data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/trackcustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +0 -33
- data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +0 -42
- data/lib/open_api_sdk/models/operations/tracklead_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +0 -42
- data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +0 -42
- data/lib/open_api_sdk/models/operations/tracksale_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +0 -42
- data/lib/open_api_sdk/models/operations/updatedomain_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/updatedomain_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updatelink_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +0 -95
- data/lib/open_api_sdk/models/operations/updatelink_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updatetag_color.rb +0 -24
- data/lib/open_api_sdk/models/operations/updatetag_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +0 -32
- data/lib/open_api_sdk/models/operations/updatetag_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +0 -27
- data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +0 -95
- data/lib/open_api_sdk/models/operations/upsertlink_response.rb +0 -60
- data/lib/open_api_sdk/models/operations.rb +0 -74
- data/lib/open_api_sdk/models/shared/badrequest.rb +0 -24
- data/lib/open_api_sdk/models/shared/code.rb +0 -18
- data/lib/open_api_sdk/models/shared/color.rb +0 -24
- data/lib/open_api_sdk/models/shared/conflict.rb +0 -24
- data/lib/open_api_sdk/models/shared/conflict_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/conflict_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/countrycode.rb +0 -267
- data/lib/open_api_sdk/models/shared/domains.rb +0 -27
- data/lib/open_api_sdk/models/shared/domainschema.rb +0 -48
- data/lib/open_api_sdk/models/shared/error.rb +0 -30
- data/lib/open_api_sdk/models/shared/forbidden.rb +0 -24
- data/lib/open_api_sdk/models/shared/forbidden_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/forbidden_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/geo.rb +0 -771
- data/lib/open_api_sdk/models/shared/internalservererror.rb +0 -24
- data/lib/open_api_sdk/models/shared/internalservererror_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/internalservererror_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/inviteexpired.rb +0 -24
- data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +0 -771
- data/lib/open_api_sdk/models/shared/linkschema.rb +0 -142
- data/lib/open_api_sdk/models/shared/notfound.rb +0 -24
- data/lib/open_api_sdk/models/shared/notfound_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/notfound_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/plan.rb +0 -24
- data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +0 -24
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/role.rb +0 -19
- data/lib/open_api_sdk/models/shared/security.rb +0 -24
- data/lib/open_api_sdk/models/shared/tagschema.rb +0 -30
- data/lib/open_api_sdk/models/shared/unauthorized.rb +0 -24
- data/lib/open_api_sdk/models/shared/unauthorized_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/unauthorized_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/unprocessableentity.rb +0 -24
- data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +0 -18
- data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +0 -30
- data/lib/open_api_sdk/models/shared/users.rb +0 -24
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +0 -81
- data/lib/open_api_sdk/models/shared.rb +0 -49
- data/lib/open_api_sdk/qr_codes.rb +0 -97
- data/lib/open_api_sdk/sdkconfiguration.rb +0 -52
- data/lib/open_api_sdk/tags.rb +0 -272
- data/lib/open_api_sdk/track.rb +0 -276
- data/lib/open_api_sdk/utils/metadata_fields.rb +0 -150
- data/lib/open_api_sdk/utils/t.rb +0 -59
- data/lib/open_api_sdk/utils/utils.rb +0 -772
- data/lib/open_api_sdk/workspaces.rb +0 -192
@@ -0,0 +1,111 @@
|
|
1
|
+
-- life.lua
|
2
|
+
-- original by Dave Bollinger <DBollinger@compuserve.com> posted to lua-l
|
3
|
+
-- modified to use ANSI terminal escape sequences
|
4
|
+
-- modified to use for instead of while
|
5
|
+
|
6
|
+
local write=io.write
|
7
|
+
|
8
|
+
ALIVE="�" DEAD="�"
|
9
|
+
ALIVE="O" DEAD="-"
|
10
|
+
|
11
|
+
function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary
|
12
|
+
for i=1,10000 do end
|
13
|
+
-- local i=os.clock()+1 while(os.clock()<i) do end
|
14
|
+
end
|
15
|
+
|
16
|
+
function ARRAY2D(w,h)
|
17
|
+
local t = {w=w,h=h}
|
18
|
+
for y=1,h do
|
19
|
+
t[y] = {}
|
20
|
+
for x=1,w do
|
21
|
+
t[y][x]=0
|
22
|
+
end
|
23
|
+
end
|
24
|
+
return t
|
25
|
+
end
|
26
|
+
|
27
|
+
_CELLS = {}
|
28
|
+
|
29
|
+
-- give birth to a "shape" within the cell array
|
30
|
+
function _CELLS:spawn(shape,left,top)
|
31
|
+
for y=0,shape.h-1 do
|
32
|
+
for x=0,shape.w-1 do
|
33
|
+
self[top+y][left+x] = shape[y*shape.w+x+1]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
-- run the CA and produce the next generation
|
39
|
+
function _CELLS:evolve(next)
|
40
|
+
local ym1,y,yp1,yi=self.h-1,self.h,1,self.h
|
41
|
+
while yi > 0 do
|
42
|
+
local xm1,x,xp1,xi=self.w-1,self.w,1,self.w
|
43
|
+
while xi > 0 do
|
44
|
+
local sum = self[ym1][xm1] + self[ym1][x] + self[ym1][xp1] +
|
45
|
+
self[y][xm1] + self[y][xp1] +
|
46
|
+
self[yp1][xm1] + self[yp1][x] + self[yp1][xp1]
|
47
|
+
next[y][x] = ((sum==2) and self[y][x]) or ((sum==3) and 1) or 0
|
48
|
+
xm1,x,xp1,xi = x,xp1,xp1+1,xi-1
|
49
|
+
end
|
50
|
+
ym1,y,yp1,yi = y,yp1,yp1+1,yi-1
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
-- output the array to screen
|
55
|
+
function _CELLS:draw()
|
56
|
+
local out="" -- accumulate to reduce flicker
|
57
|
+
for y=1,self.h do
|
58
|
+
for x=1,self.w do
|
59
|
+
out=out..(((self[y][x]>0) and ALIVE) or DEAD)
|
60
|
+
end
|
61
|
+
out=out.."\n"
|
62
|
+
end
|
63
|
+
write(out)
|
64
|
+
end
|
65
|
+
|
66
|
+
-- constructor
|
67
|
+
function CELLS(w,h)
|
68
|
+
local c = ARRAY2D(w,h)
|
69
|
+
c.spawn = _CELLS.spawn
|
70
|
+
c.evolve = _CELLS.evolve
|
71
|
+
c.draw = _CELLS.draw
|
72
|
+
return c
|
73
|
+
end
|
74
|
+
|
75
|
+
--
|
76
|
+
-- shapes suitable for use with spawn() above
|
77
|
+
--
|
78
|
+
HEART = { 1,0,1,1,0,1,1,1,1; w=3,h=3 }
|
79
|
+
GLIDER = { 0,0,1,1,0,1,0,1,1; w=3,h=3 }
|
80
|
+
EXPLODE = { 0,1,0,1,1,1,1,0,1,0,1,0; w=3,h=4 }
|
81
|
+
FISH = { 0,1,1,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,1,0; w=5,h=4 }
|
82
|
+
BUTTERFLY = { 1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,0,1,0,1,1,0,0,0,1; w=5,h=5 }
|
83
|
+
|
84
|
+
-- the main routine
|
85
|
+
function LIFE(w,h)
|
86
|
+
-- create two arrays
|
87
|
+
local thisgen = CELLS(w,h)
|
88
|
+
local nextgen = CELLS(w,h)
|
89
|
+
|
90
|
+
-- create some life
|
91
|
+
-- about 1000 generations of fun, then a glider steady-state
|
92
|
+
thisgen:spawn(GLIDER,5,4)
|
93
|
+
thisgen:spawn(EXPLODE,25,10)
|
94
|
+
thisgen:spawn(FISH,4,12)
|
95
|
+
|
96
|
+
-- run until break
|
97
|
+
local gen=1
|
98
|
+
write("\027[2J") -- ANSI clear screen
|
99
|
+
while 1 do
|
100
|
+
thisgen:evolve(nextgen)
|
101
|
+
thisgen,nextgen = nextgen,thisgen
|
102
|
+
write("\027[H") -- ANSI home cursor
|
103
|
+
thisgen:draw()
|
104
|
+
write("Life - generation ",gen,"\n")
|
105
|
+
gen=gen+1
|
106
|
+
if gen>2000 then break end
|
107
|
+
--delay() -- no delay
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
LIFE(40,20)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
-- make global variables readonly
|
2
|
+
|
3
|
+
local f=function (t,i) error("cannot redefine global variable `"..i.."'",2) end
|
4
|
+
local g={}
|
5
|
+
local G=getfenv()
|
6
|
+
setmetatable(g,{__index=G,__newindex=f})
|
7
|
+
setfenv(1,g)
|
8
|
+
|
9
|
+
-- an example
|
10
|
+
rawset(g,"x",3)
|
11
|
+
x=2
|
12
|
+
y=1 -- cannot redefine `y'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
-- the sieve of of Eratosthenes programmed with coroutines
|
2
|
+
-- typical usage: lua -e N=1000 sieve.lua | column
|
3
|
+
|
4
|
+
-- generate all the numbers from 2 to n
|
5
|
+
function gen (n)
|
6
|
+
return coroutine.wrap(function ()
|
7
|
+
for i=2,n do coroutine.yield(i) end
|
8
|
+
end)
|
9
|
+
end
|
10
|
+
|
11
|
+
-- filter the numbers generated by `g', removing multiples of `p'
|
12
|
+
function filter (p, g)
|
13
|
+
return coroutine.wrap(function ()
|
14
|
+
while 1 do
|
15
|
+
local n = g()
|
16
|
+
if n == nil then return end
|
17
|
+
if math.mod(n, p) ~= 0 then coroutine.yield(n) end
|
18
|
+
end
|
19
|
+
end)
|
20
|
+
end
|
21
|
+
|
22
|
+
N=N or 1000 -- from command line
|
23
|
+
x = gen(N) -- generate primes up to N
|
24
|
+
while 1 do
|
25
|
+
local n = x() -- pick a number until done
|
26
|
+
if n == nil then break end
|
27
|
+
print(n) -- must be a prime number
|
28
|
+
x = filter(n, x) -- now remove its multiples
|
29
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
-- two implementations of a sort function
|
2
|
+
-- this is an example only. Lua has now a built-in function "sort"
|
3
|
+
|
4
|
+
-- extracted from Programming Pearls, page 110
|
5
|
+
function qsort(x,l,u,f)
|
6
|
+
if l<u then
|
7
|
+
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
|
8
|
+
x[l],x[m]=x[m],x[l] -- swap pivot to first position
|
9
|
+
local t=x[l] -- pivot value
|
10
|
+
m=l
|
11
|
+
local i=l+1
|
12
|
+
while i<=u do
|
13
|
+
-- invariant: x[l+1..m] < t <= x[m+1..i-1]
|
14
|
+
if f(x[i],t) then
|
15
|
+
m=m+1
|
16
|
+
x[m],x[i]=x[i],x[m] -- swap x[i] and x[m]
|
17
|
+
end
|
18
|
+
i=i+1
|
19
|
+
end
|
20
|
+
x[l],x[m]=x[m],x[l] -- swap pivot to a valid place
|
21
|
+
-- x[l+1..m-1] < x[m] <= x[m+1..u]
|
22
|
+
qsort(x,l,m-1,f)
|
23
|
+
qsort(x,m+1,u,f)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
function selectionsort(x,n,f)
|
28
|
+
local i=1
|
29
|
+
while i<=n do
|
30
|
+
local m,j=i,i+1
|
31
|
+
while j<=n do
|
32
|
+
if f(x[j],x[m]) then m=j end
|
33
|
+
j=j+1
|
34
|
+
end
|
35
|
+
x[i],x[m]=x[m],x[i] -- swap x[i] and x[m]
|
36
|
+
i=i+1
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
function show(m,x)
|
41
|
+
io.write(m,"\n\t")
|
42
|
+
local i=1
|
43
|
+
while x[i] do
|
44
|
+
io.write(x[i])
|
45
|
+
i=i+1
|
46
|
+
if x[i] then io.write(",") end
|
47
|
+
end
|
48
|
+
io.write("\n")
|
49
|
+
end
|
50
|
+
|
51
|
+
function testsorts(x)
|
52
|
+
local n=1
|
53
|
+
while x[n] do n=n+1 end; n=n-1 -- count elements
|
54
|
+
show("original",x)
|
55
|
+
qsort(x,1,n,function (x,y) return x<y end)
|
56
|
+
show("after quicksort",x)
|
57
|
+
selectionsort(x,n,function (x,y) return x>y end)
|
58
|
+
show("after reverse selection sort",x)
|
59
|
+
qsort(x,1,n,function (x,y) return x<y end)
|
60
|
+
show("after quicksort again",x)
|
61
|
+
end
|
62
|
+
|
63
|
+
-- array to be sorted
|
64
|
+
x={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}
|
65
|
+
|
66
|
+
testsorts(x)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
-- make table, grouping all data for the same item
|
2
|
+
-- input is 2 columns (item, data)
|
3
|
+
|
4
|
+
local A
|
5
|
+
while 1 do
|
6
|
+
local l=io.read()
|
7
|
+
if l==nil then break end
|
8
|
+
local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$')
|
9
|
+
if a~=A then A=a io.write("\n",a,":") end
|
10
|
+
io.write(" ",b)
|
11
|
+
end
|
12
|
+
io.write("\n")
|
@@ -0,0 +1,32 @@
|
|
1
|
+
-- trace calls
|
2
|
+
-- example: lua -ltrace-calls bisect.lua
|
3
|
+
|
4
|
+
local level=0
|
5
|
+
|
6
|
+
local function hook(event)
|
7
|
+
local t=debug.getinfo(3)
|
8
|
+
io.write(level," >>> ",string.rep(" ",level))
|
9
|
+
if t~=nil and t.currentline>=0 then io.write(t.short_src,":",t.currentline," ") end
|
10
|
+
t=debug.getinfo(2)
|
11
|
+
if event=="call" then
|
12
|
+
level=level+1
|
13
|
+
else
|
14
|
+
level=level-1 if level<0 then level=0 end
|
15
|
+
end
|
16
|
+
if t.what=="main" then
|
17
|
+
if event=="call" then
|
18
|
+
io.write("begin ",t.short_src)
|
19
|
+
else
|
20
|
+
io.write("end ",t.short_src)
|
21
|
+
end
|
22
|
+
elseif t.what=="Lua" then
|
23
|
+
-- table.foreach(t,print)
|
24
|
+
io.write(event," ",t.name or "(Lua)"," <",t.linedefined,":",t.short_src,">")
|
25
|
+
else
|
26
|
+
io.write(event," ",t.name or "(C)"," [",t.what,"] ")
|
27
|
+
end
|
28
|
+
io.write("\n")
|
29
|
+
end
|
30
|
+
|
31
|
+
debug.sethook(hook,"cr")
|
32
|
+
level=0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
-- trace assigments to global variables
|
2
|
+
|
3
|
+
do
|
4
|
+
-- a tostring that quotes strings. note the use of the original tostring.
|
5
|
+
local _tostring=tostring
|
6
|
+
local tostring=function(a)
|
7
|
+
if type(a)=="string" then
|
8
|
+
return string.format("%q",a)
|
9
|
+
else
|
10
|
+
return _tostring(a)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
local log=function (name,old,new)
|
15
|
+
local t=debug.getinfo(3,"Sl")
|
16
|
+
local line=t.currentline
|
17
|
+
io.write(t.short_src)
|
18
|
+
if line>=0 then io.write(":",line) end
|
19
|
+
io.write(": ",name," is now ",tostring(new)," (was ",tostring(old),")","\n")
|
20
|
+
end
|
21
|
+
|
22
|
+
local g={}
|
23
|
+
local set=function (t,name,value)
|
24
|
+
log(name,g[name],value)
|
25
|
+
g[name]=value
|
26
|
+
end
|
27
|
+
setmetatable(getfenv(),{__index=g,__newindex=set})
|
28
|
+
end
|
29
|
+
|
30
|
+
-- an example
|
31
|
+
|
32
|
+
a=1
|
33
|
+
b=2
|
34
|
+
a=10
|
35
|
+
b=20
|
36
|
+
b=nil
|
37
|
+
b=200
|
38
|
+
print(a,b,c)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
-- hex dump
|
2
|
+
-- usage: lua xd.lua < file
|
3
|
+
|
4
|
+
local offset=0
|
5
|
+
while true do
|
6
|
+
local s=io.read(16)
|
7
|
+
if s==nil then return end
|
8
|
+
io.write(string.format("%08X ",offset))
|
9
|
+
string.gsub(s,"(.)",
|
10
|
+
function (c) io.write(string.format("%02X ",string.byte(c))) end)
|
11
|
+
io.write(string.rep(" ",3*(16-string.len(s))))
|
12
|
+
io.write(" ",string.gsub(s,"%c","."),"\n")
|
13
|
+
offset=offset+16
|
14
|
+
end
|
@@ -0,0 +1,281 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
2
|
+
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.6.3">
|
3
|
+
<compounddef id="classdub_1_1_matrix" kind="class" prot="public">
|
4
|
+
<compoundname>dub::Matrix</compoundname>
|
5
|
+
<sectiondef kind="private-attrib">
|
6
|
+
<memberdef kind="variable" id="classdub_1_1_matrix_1a134af4a94d273c34cc99e7645fb97917" prot="private" static="no" mutable="no">
|
7
|
+
<type>double *</type>
|
8
|
+
<definition>double* dub::Matrix::data_</definition>
|
9
|
+
<argsstring></argsstring>
|
10
|
+
<name>data_</name>
|
11
|
+
<briefdescription>
|
12
|
+
</briefdescription>
|
13
|
+
<detaileddescription>
|
14
|
+
</detaileddescription>
|
15
|
+
<inbodydescription>
|
16
|
+
</inbodydescription>
|
17
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="71" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="71" bodyend="-1"/>
|
18
|
+
</memberdef>
|
19
|
+
<memberdef kind="variable" id="classdub_1_1_matrix_1afbb3dac9aac8db0e6feffb8c61954065" prot="private" static="no" mutable="no">
|
20
|
+
<type>size_t</type>
|
21
|
+
<definition>size_t dub::Matrix::rows_</definition>
|
22
|
+
<argsstring></argsstring>
|
23
|
+
<name>rows_</name>
|
24
|
+
<briefdescription>
|
25
|
+
</briefdescription>
|
26
|
+
<detaileddescription>
|
27
|
+
</detaileddescription>
|
28
|
+
<inbodydescription>
|
29
|
+
</inbodydescription>
|
30
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="72" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="72" bodyend="-1"/>
|
31
|
+
</memberdef>
|
32
|
+
<memberdef kind="variable" id="classdub_1_1_matrix_1a9820706da6cb36cf14dfefbb4eabc92d" prot="private" static="no" mutable="no">
|
33
|
+
<type>size_t</type>
|
34
|
+
<definition>size_t dub::Matrix::cols_</definition>
|
35
|
+
<argsstring></argsstring>
|
36
|
+
<name>cols_</name>
|
37
|
+
<briefdescription>
|
38
|
+
</briefdescription>
|
39
|
+
<detaileddescription>
|
40
|
+
</detaileddescription>
|
41
|
+
<inbodydescription>
|
42
|
+
</inbodydescription>
|
43
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="73" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="73" bodyend="-1"/>
|
44
|
+
</memberdef>
|
45
|
+
</sectiondef>
|
46
|
+
<sectiondef kind="public-func">
|
47
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a2d7bfdf38d81c5ec81dff23030d2b569" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
48
|
+
<type></type>
|
49
|
+
<definition>dub::Matrix::Matrix</definition>
|
50
|
+
<argsstring>()</argsstring>
|
51
|
+
<name>Matrix</name>
|
52
|
+
<briefdescription>
|
53
|
+
</briefdescription>
|
54
|
+
<detaileddescription>
|
55
|
+
</detaileddescription>
|
56
|
+
<inbodydescription>
|
57
|
+
</inbodydescription>
|
58
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="14" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="14" bodyend="14"/>
|
59
|
+
</memberdef>
|
60
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a87d276a9bfb52dbe228a19c2eae63b4b" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
61
|
+
<type></type>
|
62
|
+
<definition>dub::Matrix::Matrix</definition>
|
63
|
+
<argsstring>(int rows, int cols)</argsstring>
|
64
|
+
<name>Matrix</name>
|
65
|
+
<param>
|
66
|
+
<type>int</type>
|
67
|
+
<declname>rows</declname>
|
68
|
+
</param>
|
69
|
+
<param>
|
70
|
+
<type>int</type>
|
71
|
+
<declname>cols</declname>
|
72
|
+
</param>
|
73
|
+
<briefdescription>
|
74
|
+
</briefdescription>
|
75
|
+
<detaileddescription>
|
76
|
+
</detaileddescription>
|
77
|
+
<inbodydescription>
|
78
|
+
</inbodydescription>
|
79
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="16" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="16" bodyend="18"/>
|
80
|
+
</memberdef>
|
81
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a7bbf87936b3a48a69fcc1a74038bdd25" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
82
|
+
<type></type>
|
83
|
+
<definition>dub::Matrix::~Matrix</definition>
|
84
|
+
<argsstring>()</argsstring>
|
85
|
+
<name>~Matrix</name>
|
86
|
+
<briefdescription>
|
87
|
+
</briefdescription>
|
88
|
+
<detaileddescription>
|
89
|
+
</detaileddescription>
|
90
|
+
<inbodydescription>
|
91
|
+
</inbodydescription>
|
92
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="20" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="20" bodyend="22"/>
|
93
|
+
</memberdef>
|
94
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a91cd7ece7296a2f2b37f2b629dc66fed" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
95
|
+
<type>size_t</type>
|
96
|
+
<definition>size_t dub::Matrix::size</definition>
|
97
|
+
<argsstring>()</argsstring>
|
98
|
+
<name>size</name>
|
99
|
+
<briefdescription>
|
100
|
+
</briefdescription>
|
101
|
+
<detaileddescription>
|
102
|
+
<para>Return size of matrix (rows * cols). </para> </detaileddescription>
|
103
|
+
<inbodydescription>
|
104
|
+
</inbodydescription>
|
105
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="25" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="25" bodyend="27"/>
|
106
|
+
</memberdef>
|
107
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1ac13eec5120f1be537122fc2b9a35d12e" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
108
|
+
<type>double</type>
|
109
|
+
<definition>double dub::Matrix::cols</definition>
|
110
|
+
<argsstring>()</argsstring>
|
111
|
+
<name>cols</name>
|
112
|
+
<briefdescription>
|
113
|
+
</briefdescription>
|
114
|
+
<detaileddescription>
|
115
|
+
</detaileddescription>
|
116
|
+
<inbodydescription>
|
117
|
+
</inbodydescription>
|
118
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="29" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="29" bodyend="31"/>
|
119
|
+
</memberdef>
|
120
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1aad380f21efca0eb8d076fa7801efe903" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
121
|
+
<type>double</type>
|
122
|
+
<definition>double dub::Matrix::rows</definition>
|
123
|
+
<argsstring>()</argsstring>
|
124
|
+
<name>rows</name>
|
125
|
+
<briefdescription>
|
126
|
+
</briefdescription>
|
127
|
+
<detaileddescription>
|
128
|
+
</detaileddescription>
|
129
|
+
<inbodydescription>
|
130
|
+
</inbodydescription>
|
131
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="33" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="33" bodyend="35"/>
|
132
|
+
</memberdef>
|
133
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a7a47bc085de140093ba358d345d58df7" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
134
|
+
<templateparamlist>
|
135
|
+
<param>
|
136
|
+
<type>class T</type>
|
137
|
+
</param>
|
138
|
+
</templateparamlist>
|
139
|
+
<type>T *</type>
|
140
|
+
<definition>T* dub::Matrix::give_me_tea</definition>
|
141
|
+
<argsstring>()</argsstring>
|
142
|
+
<name>give_me_tea</name>
|
143
|
+
<briefdescription>
|
144
|
+
</briefdescription>
|
145
|
+
<detaileddescription>
|
146
|
+
<para>Dummy template based class method. </para> </detaileddescription>
|
147
|
+
<inbodydescription>
|
148
|
+
</inbodydescription>
|
149
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="40" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="40" bodyend="42"/>
|
150
|
+
</memberdef>
|
151
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a27fea405cf08ac087a11eefbaf4a342f" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
152
|
+
<type></type>
|
153
|
+
<definition>dub::Matrix::operator size_t</definition>
|
154
|
+
<argsstring>()</argsstring>
|
155
|
+
<name>operator size_t</name>
|
156
|
+
<briefdescription>
|
157
|
+
</briefdescription>
|
158
|
+
<detaileddescription>
|
159
|
+
</detaileddescription>
|
160
|
+
<inbodydescription>
|
161
|
+
</inbodydescription>
|
162
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="44" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="44" bodyend="46"/>
|
163
|
+
</memberdef>
|
164
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1ac159906fa5480fdc9539a7be1e1825ed" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
165
|
+
<type>void</type>
|
166
|
+
<definition>void dub::Matrix::mul</definition>
|
167
|
+
<argsstring>(TMat< int > other)</argsstring>
|
168
|
+
<name>mul</name>
|
169
|
+
<param>
|
170
|
+
<type><ref refid="classdub_1_1_t_mat" kindref="compound">TMat</ref>< int ></type>
|
171
|
+
<declname>other</declname>
|
172
|
+
</param>
|
173
|
+
<briefdescription>
|
174
|
+
</briefdescription>
|
175
|
+
<detaileddescription>
|
176
|
+
</detaileddescription>
|
177
|
+
<inbodydescription>
|
178
|
+
</inbodydescription>
|
179
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="48" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="48" bodyend="50"/>
|
180
|
+
</memberdef>
|
181
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a5bf5b5aee77c4e4a4cf906ce785fe37b" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
182
|
+
<type>void</type>
|
183
|
+
<definition>void dub::Matrix::do_something</definition>
|
184
|
+
<argsstring>(int i, bool fast=false)</argsstring>
|
185
|
+
<name>do_something</name>
|
186
|
+
<param>
|
187
|
+
<type>int</type>
|
188
|
+
<declname>i</declname>
|
189
|
+
</param>
|
190
|
+
<param>
|
191
|
+
<type>bool</type>
|
192
|
+
<declname>fast</declname>
|
193
|
+
<defval>false</defval>
|
194
|
+
</param>
|
195
|
+
<briefdescription>
|
196
|
+
</briefdescription>
|
197
|
+
<detaileddescription>
|
198
|
+
</detaileddescription>
|
199
|
+
<inbodydescription>
|
200
|
+
</inbodydescription>
|
201
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="52" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="52" bodyend="54"/>
|
202
|
+
</memberdef>
|
203
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a5d8ae4699d499cb9e4292c2ff765d3a1" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
204
|
+
<type>void</type>
|
205
|
+
<definition>void dub::Matrix::use_other_lib</definition>
|
206
|
+
<argsstring>(const std::string &name)</argsstring>
|
207
|
+
<name>use_other_lib</name>
|
208
|
+
<param>
|
209
|
+
<type>const std::string &</type>
|
210
|
+
<declname>name</declname>
|
211
|
+
</param>
|
212
|
+
<briefdescription>
|
213
|
+
</briefdescription>
|
214
|
+
<detaileddescription>
|
215
|
+
</detaileddescription>
|
216
|
+
<inbodydescription>
|
217
|
+
</inbodydescription>
|
218
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="56" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="56" bodyend="58"/>
|
219
|
+
</memberdef>
|
220
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1a90798c27b8b4017a939f804481eb50ad" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
|
221
|
+
<type>int *</type>
|
222
|
+
<definition>int* dub::Matrix::ptr</definition>
|
223
|
+
<argsstring>()</argsstring>
|
224
|
+
<name>ptr</name>
|
225
|
+
<briefdescription>
|
226
|
+
</briefdescription>
|
227
|
+
<detaileddescription>
|
228
|
+
</detaileddescription>
|
229
|
+
<inbodydescription>
|
230
|
+
</inbodydescription>
|
231
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="60" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="60" bodyend="62"/>
|
232
|
+
</memberdef>
|
233
|
+
</sectiondef>
|
234
|
+
<sectiondef kind="public-static-func">
|
235
|
+
<memberdef kind="function" id="classdub_1_1_matrix_1ad21255c4a1457c9969b6092ee40e0870" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
|
236
|
+
<type><ref refid="classdub_1_1_matrix" kindref="compound">Matrix</ref> *</type>
|
237
|
+
<definition>static Matrix* dub::Matrix::MakeMatrix</definition>
|
238
|
+
<argsstring>(int rows, int cols)</argsstring>
|
239
|
+
<name>MakeMatrix</name>
|
240
|
+
<param>
|
241
|
+
<type>int</type>
|
242
|
+
<declname>rows</declname>
|
243
|
+
</param>
|
244
|
+
<param>
|
245
|
+
<type>int</type>
|
246
|
+
<declname>cols</declname>
|
247
|
+
</param>
|
248
|
+
<briefdescription>
|
249
|
+
</briefdescription>
|
250
|
+
<detaileddescription>
|
251
|
+
<para>Named constructor. </para> </detaileddescription>
|
252
|
+
<inbodydescription>
|
253
|
+
</inbodydescription>
|
254
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="66" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="66" bodyend="68"/>
|
255
|
+
</memberdef>
|
256
|
+
</sectiondef>
|
257
|
+
<briefdescription>
|
258
|
+
</briefdescription>
|
259
|
+
<detaileddescription>
|
260
|
+
</detaileddescription>
|
261
|
+
<location file="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" line="12" bodyfile="/Users/gaspard/git/dub/test/fixtures/app/include/matrix.h" bodystart="12" bodyend="74"/>
|
262
|
+
<listofallmembers>
|
263
|
+
<member refid="classdub_1_1_matrix_1ac13eec5120f1be537122fc2b9a35d12e" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>cols</name></member>
|
264
|
+
<member refid="classdub_1_1_matrix_1a9820706da6cb36cf14dfefbb4eabc92d" prot="private" virt="non-virtual"><scope>dub::Matrix</scope><name>cols_</name></member>
|
265
|
+
<member refid="classdub_1_1_matrix_1a134af4a94d273c34cc99e7645fb97917" prot="private" virt="non-virtual"><scope>dub::Matrix</scope><name>data_</name></member>
|
266
|
+
<member refid="classdub_1_1_matrix_1a5bf5b5aee77c4e4a4cf906ce785fe37b" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>do_something</name></member>
|
267
|
+
<member refid="classdub_1_1_matrix_1a7a47bc085de140093ba358d345d58df7" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>give_me_tea</name></member>
|
268
|
+
<member refid="classdub_1_1_matrix_1ad21255c4a1457c9969b6092ee40e0870" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>MakeMatrix</name></member>
|
269
|
+
<member refid="classdub_1_1_matrix_1a2d7bfdf38d81c5ec81dff23030d2b569" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>Matrix</name></member>
|
270
|
+
<member refid="classdub_1_1_matrix_1a87d276a9bfb52dbe228a19c2eae63b4b" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>Matrix</name></member>
|
271
|
+
<member refid="classdub_1_1_matrix_1ac159906fa5480fdc9539a7be1e1825ed" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>mul</name></member>
|
272
|
+
<member refid="classdub_1_1_matrix_1a27fea405cf08ac087a11eefbaf4a342f" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>operator size_t</name></member>
|
273
|
+
<member refid="classdub_1_1_matrix_1a90798c27b8b4017a939f804481eb50ad" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>ptr</name></member>
|
274
|
+
<member refid="classdub_1_1_matrix_1aad380f21efca0eb8d076fa7801efe903" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>rows</name></member>
|
275
|
+
<member refid="classdub_1_1_matrix_1afbb3dac9aac8db0e6feffb8c61954065" prot="private" virt="non-virtual"><scope>dub::Matrix</scope><name>rows_</name></member>
|
276
|
+
<member refid="classdub_1_1_matrix_1a91cd7ece7296a2f2b37f2b629dc66fed" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>size</name></member>
|
277
|
+
<member refid="classdub_1_1_matrix_1a5d8ae4699d499cb9e4292c2ff765d3a1" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>use_other_lib</name></member>
|
278
|
+
<member refid="classdub_1_1_matrix_1a7bbf87936b3a48a69fcc1a74038bdd25" prot="public" virt="non-virtual"><scope>dub::Matrix</scope><name>~Matrix</name></member>
|
279
|
+
</listofallmembers>
|
280
|
+
</compounddef>
|
281
|
+
</doxygen>
|