MinCamlとArray.make
Array.make は7つ
呼び出し元
read_nth_object
code:ocaml
let abc = Array.make 3 0.0 in
...
let xyz = Array.make 3 0.0 in
...
let reflparam = Array.make 2 0.0 in
...
let color = Array.make 3 0.0 in
...
let rotation = Array.make 3 0.0 in
...
呼び出し履歴
rt => read_parameter => read_all_object => read_object => read_nth_object
read_net_item
code:ocaml
(* ネットワーク1つを読み込みベクトルにして返す *)
let rec read_net_item length =
let item = read_int () in
if item = -1 then Array.make (length + 1) (-1)
else
let v = read_net_item (length + 1) in
(v.(length) <- item; v)
in
呼び出し履歴
rt => read_parameter => (read_or_network | read_and_network) => read_net_item
read_or_network
code:ocaml
let rec read_or_network length =
let net = read_net_item 0 in
if net.(0) = -1 then
Array.make (length + 1) net
else
let v = read_or_network (length + 1) in
(v.(length) <- net; v)
in