Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
influence_maximization
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rsmelo@inf.ufpr.br
influence_maximization
Commits
9dd2fab3
Commit
9dd2fab3
authored
9 years ago
by
Renato Melo
Browse files
Options
Downloads
Patches
Plain Diff
preprarando simulação
parent
f7fad9b5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/grafos/DirectedSocialNetwork.java
+1
-1
1 addition, 1 deletion
src/grafos/DirectedSocialNetwork.java
src/plot/MeuPlot.java
+6
-6
6 additions, 6 deletions
src/plot/MeuPlot.java
src/simulacao/Simulacao.java
+4
-4
4 additions, 4 deletions
src/simulacao/Simulacao.java
with
11 additions
and
11 deletions
src/grafos/DirectedSocialNetwork.java
+
1
−
1
View file @
9dd2fab3
...
...
@@ -186,7 +186,7 @@ public class DirectedSocialNetwork extends
public
double
espectedSpread
(
HashSet
<
Actor
>
seed
,
boolean
ic
)
{
double
media
=
0
;
int
soma
=
0
;
int
repeticoes
=
100
;
int
repeticoes
=
100
00
;
if
(!
ic
)
{
HashSet
<
Actor
>
ativados
=
linearThresholdDiffusion
(
seed
);
...
...
This diff is collapsed.
Click to expand it.
src/plot/MeuPlot.java
+
6
−
6
View file @
9dd2fab3
...
...
@@ -25,9 +25,9 @@ public class MeuPlot extends JGnuplot {
plotPropagacao
.
add
(
dts
);
plot
.
compile
(
plotPropagacao
,
plot
.
plot2d
,
"propagacao_esperada.plt"
);
//
this.terminal = "epslatex color colortext dashed";
this
.
terminal
=
"eps color dashed"
;
this
.
output
=
outDir
+
"propagacao.
eps
'"
;
this
.
terminal
=
"epslatex color colortext dashed"
;
//
this.terminal = "eps color dashed";
this
.
output
=
outDir
+
"propagacao.
tex
'"
;
this
.
execute
(
plotPropagacao
,
this
.
plot2d
);
}
...
...
@@ -67,9 +67,9 @@ public class MeuPlot extends JGnuplot {
plotTempo
.
add
(
dts2
);
plot
.
compile
(
plotTempo
,
plot
.
plot2d
,
"tempo_execucao.plt"
);
//
this.terminal = "epslatex color colortext dashed";
this
.
terminal
=
"eps color dashed"
;
this
.
output
=
outDir
+
"tempo.
eps
'"
;
this
.
terminal
=
"epslatex color colortext dashed"
;
//
this.terminal = "eps color dashed";
this
.
output
=
outDir
+
"tempo.
tex
'"
;
this
.
execute
(
plotTempo
,
this
.
plot2d
);
}
...
...
This diff is collapsed.
Click to expand it.
src/simulacao/Simulacao.java
+
4
−
4
View file @
9dd2fab3
...
...
@@ -47,7 +47,7 @@ public class Simulacao {
+
", tempo = "
+
tempo2
[
i
]
+
" segundos"
);
excutionTime
=
System
.
currentTimeMillis
()
*
-
1
;
HashSet
<
Actor
>
seed3
=
new
DominatingS
ee
d
(
g
).
escolher
Greedy
(
k
);
HashSet
<
Actor
>
seed3
=
new
HightDegr
ee
(
g
).
escolher
(
k
);
excutionTime
+=
System
.
currentTimeMillis
();
tempo3
[
i
]
=
(
excutionTime
/
1000.0f
);
sigma3
[
i
]
=
g
.
espectedSpread
(
seed3
,
true
);
...
...
@@ -73,14 +73,14 @@ public class Simulacao {
public
static
void
main
(
String
[]
args
)
{
// simularArtificial();
//
simularHep();
simularPhy
();
simularHep
();
//
simularPhy();
// simularEpinions();
}
private
static
void
simularArtificial
()
{
DirectedSocialNetwork
g
;
g
=
new
SocialNetworkGenerate
().
gerarGrafo
(
3
00
,
2.
8
);
g
=
new
SocialNetworkGenerate
().
gerarGrafo
(
10
00
,
2.
5
);
System
.
out
.
println
(
"|V(G)| = "
+
g
.
vertexSet
().
size
());
System
.
out
.
println
(
"|E(G)| = "
+
g
.
edgeSet
().
size
());
...
...
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