-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtechnome_mutator.erl
More file actions
34 lines (30 loc) · 888 Bytes
/
technome_mutator.erl
File metadata and controls
34 lines (30 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%% This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch.COM
%%
%Copyright (C) 2009 by Gene Sher, DXNN Research Group, CorticalComputer@gmail.com
%All rights reserved.
%
%This code is licensed under the version 3 of the GNU General Public License. Please see the LICENSE file that accompanies this project for the terms of use.
-module(technome_mutator).
-compile(export_all).
-include("records.hrl").
test()->
F = fun()->
mutate(dx_test)
end,
mnesia:transaction(F).
mutate(DX_Id)->
F = fun()->
[DX] = mnesia:read({dx,DX_Id}),
CX_Id = DX#dx.cx_id,
[CX] = mnesia:read({cortex,CX_Id}),
modular_mutator:mutate(DX_Id)
end,
Result = mnesia:transaction(F),
case Result of
{atomic,_} ->
% io:format("******** Mutation Succesful.~n"),
done;
_->
io:format("******** Mutation Failure:~p~n",[Result]),
mutate(DX_Id)
end.