diff --git a/src/grafos/DirectedSocialNetwork.java b/src/grafos/DirectedSocialNetwork.java index ffcdeaa8729abf39bc0a2a6645958768108d9201..f9d2f3a087405e5efacd3540971a027e51923512 100644 --- a/src/grafos/DirectedSocialNetwork.java +++ b/src/grafos/DirectedSocialNetwork.java @@ -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 = 10000; if (!ic) { HashSet<Actor> ativados = linearThresholdDiffusion(seed); diff --git a/src/plot/MeuPlot.java b/src/plot/MeuPlot.java index 2b01b902a5a3e5bfd94635ee71c3faf136f3d847..a45716e1269c25a294b858dc795cfcb66fd5fd42 100644 --- a/src/plot/MeuPlot.java +++ b/src/plot/MeuPlot.java @@ -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); } diff --git a/src/simulacao/Simulacao.java b/src/simulacao/Simulacao.java index 3e1e2575835d4b259fce5261b6cf7f00d9d6aed7..7ae2ade35216e794d1c73e0be62ab68e07e38cc4 100644 --- a/src/simulacao/Simulacao.java +++ b/src/simulacao/Simulacao.java @@ -47,7 +47,7 @@ public class Simulacao { + ", tempo = " + tempo2[i] + " segundos"); excutionTime = System.currentTimeMillis() * -1; - HashSet<Actor> seed3 = new DominatingSeed(g).escolherGreedy(k); + HashSet<Actor> seed3 = new HightDegree(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(300, 2.8); + g = new SocialNetworkGenerate().gerarGrafo(1000, 2.5); System.out.println("|V(G)| = " + g.vertexSet().size()); System.out.println("|E(G)| = " + g.edgeSet().size());