Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ackley_mc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Wartung heute um 18:25 wegen einer Sicherheitswarnung von GitLab
Show more breadcrumbs
Torda, Prof. Dr. Andrew Ernest
ackley_mc
Commits
c5fc8acc
You need to sign in or sign up before continuing.
Commit
c5fc8acc
authored
3 years ago
by
Andrew E. Torda
Browse files
Options
Downloads
Patches
Plain Diff
Table driven version of original tests.
parent
bfce75c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ackwork/ackwork_test.go
+15
-16
15 additions, 16 deletions
ackwork/ackwork_test.go
with
15 additions
and
16 deletions
ackwork/ackwork_test.go
+
15
−
16
View file @
c5fc8acc
...
@@ -22,12 +22,6 @@ n_step 10000
...
@@ -22,12 +22,6 @@ n_step 10000
n_output 5000
n_output 5000
f_outName testanneal1d`
f_outName testanneal1d`
func
TestAnneal1d
(
t
*
testing
.
T
)
{
if
err
:=
realmain
(
strings
.
NewReader
(
s1d
));
err
!=
nil
{
t
.
Fatal
(
"anneal run"
,
err
)
}
}
var
s3d
=
`
var
s3d
=
`
ini_temp 1
ini_temp 1
final_temp 0.05
final_temp 0.05
...
@@ -36,13 +30,6 @@ n_step 10000
...
@@ -36,13 +30,6 @@ n_step 10000
n_output 500
n_output 500
f_outName testanneal3d`
f_outName testanneal3d`
func
TestAnneal3d
(
t
*
testing
.
T
)
{
if
err
:=
realmain
(
strings
.
NewReader
(
s3d
));
err
!=
nil
{
t
.
Fatal
(
"anneal run"
,
err
)
}
}
var
sCold
=
`
var
sCold
=
`
ini_temp 1e-10
ini_temp 1e-10
final_temp 1e-12
final_temp 1e-12
...
@@ -51,8 +38,20 @@ n_step 10000
...
@@ -51,8 +38,20 @@ n_step 10000
n_output 500
n_output 500
f_outName testcold`
f_outName testcold`
func
TestCold
(
t
*
testing
.
T
)
{
var
sHot
=
`
if
err
:=
realmain
(
strings
.
NewReader
(
sCold
));
err
!=
nil
{
ini_temp 1
t
.
Fatal
(
"anneal run"
,
err
)
final_temp 1
x_ini 1,1,1
n_step 10000
n_output 500
f_outName testhot`
var
plottable_test
=
[]
string
{
s1d
,
s3d
,
sHot
,
sCold
}
func
TestPlottable
(
t
*
testing
.
T
)
{
for
_
,
s
:=
range
plottable_test
{
if
err
:=
realmain
(
strings
.
NewReader
(
sHot
));
err
!=
nil
{
t
.
Fatal
(
"plottable failed with
\n
"
,
err
,
"
\n
Input"
,
s
)
}
}
}
}
}
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