Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Prolog mlpack Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
Prolog mlpack Library
Commits
c603d0c4
Commit
c603d0c4
authored
2 years ago
by
Dean Samuel Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
Update Makefile, main.pl
parent
02cf7b25
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
main.pl
+4
-4
4 additions, 4 deletions
main.pl
with
5 additions
and
5 deletions
Makefile
+
1
−
1
View file @
c603d0c4
splfr
=
/usr/local/sicstus4.7.1/bin/splfr
main.so
:
main.pl main.cpp
$(
splfr
)
-lmlpack
-lstdc
++
-cxx
--struct
main.pl main.cpp mlpack-3.4.2/src/mlpack/methods/bayesian_linear_regression/bayesian_linear_regression.cpp
$(
splfr
)
-larmadillo
-lmlpack
-lstdc
++
-cxx
--struct
main.pl main.cpp mlpack-3.4.2/src/mlpack/methods/bayesian_linear_regression/bayesian_linear_regression.cpp
clean
:
rm
main.so
This diff is collapsed.
Click to expand it.
main.pl
+
4
−
4
View file @
c603d0c4
...
...
@@ -41,7 +41,7 @@ convert_list_to_float_array(Arr, array(Size,Mem)) :-
new
(
float_array
,
Size
,
Mem
),
fill_float_array
(
Arr
,
0
,
Mem
).
fill_float_array
([],
_
,
_
).
fill_float_array
([],
_
,
_
)
:-
!
.
fill_float_array
([
H
|
Tail
],
Index
,
Mem
)
:-
put_contents
(
Mem
,
Index
,
H
),
New_index
is
Index
+
1
,
...
...
@@ -50,7 +50,7 @@ fill_float_array([H|Tail], Index, Mem) :-
convert_float_array_to_list
(
Mem
,
Count
,
Out
)
:-
convert_float_array_to_list
(
Mem
,
0
,
Count
,
Out
).
convert_float_array_to_list
(
_
,
Count
,
Count
,
[]).
convert_float_array_to_list
(
_
,
Count
,
Count
,
[])
:-
!
.
convert_float_array_to_list
(
Mem
,
Index
,
Count
,
[
Val
|
Rest
])
:-
NewIndex
is
Index
+
1
,
...
...
@@ -61,13 +61,13 @@ convert_float_array_to_list(Mem, Index, Count, [Val|Rest]) :-
%% Funktions for reading the csv Files
%% returns the length of a list
len
([],
0
).
len
([],
0
)
:-
!
.
len
([
_
|
Tail
],
List_L
)
:-
len
(
Tail
,
Tail_L
),
List_L
is
Tail_L
+
1
.
%% take the elements in a csv record and put them in a list
convert_record_to_arr
([],
[]).
convert_record_to_arr
([],
[])
:-
!
.
convert_record_to_arr
([
float
(
Num
,
_
)|
Tail
],
[
Num
|
Rest
])
:-
convert_record_to_arr
(
Tail
,
Rest
).
convert_record_to_arr
([
string
(
_
)|
Tail
],
Rest
)
:-
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment