Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
c5e91371
Commit
c5e91371
authored
Jan 03, 2017
by
Marc Schiller
Browse files
Fixed logarithmic model.
parent
27cd51c7
Changes
1
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/views/fiveg/models/LogarithmicModel.java
View file @
c5e91371
...
...
@@ -59,7 +59,7 @@ public class LogarithmicModel extends AbstractModel {
@Override
public
double
getDouble
(
int
users
)
{
double
tmp
=
this
.
a
*
Math
.
log
(
this
.
c
*
users
+
this
.
d
)
+
this
.
b
;
double
tmp
=
this
.
a
*
Math
.
log
(
this
.
c
*
(
users
-
this
.
d
)
)
+
this
.
b
;
if
(
tmp
<
0
)
{
return
0
;
}
else
{
...
...
@@ -69,7 +69,7 @@ public class LogarithmicModel extends AbstractModel {
@Override
public
String
toString
()
{
return
"Logarithmic Model: log(u) = "
+
this
.
a
+
" * ln("
+
this
.
c
+
" * u
+
"
+
this
.
d
+
") + "
+
this
.
b
;
return
"Logarithmic Model: log(u) = "
+
this
.
a
+
" * ln("
+
this
.
c
+
" *
(
u
-
"
+
this
.
d
+
")
)
+ "
+
this
.
b
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment