Skip to content
Snippets Groups Projects
Commit 9dd2fab3 authored by Renato Melo's avatar Renato Melo
Browse files

preprarando simulação

parent f7fad9b5
Branches
Tags
No related merge requests found
......@@ -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);
......
......@@ -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);
}
......
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment