Ejemplo n.º 1
0
 public string getAmigosNivel3(int userID)
 {
     PrologExec p = new PrologExec(userID + "", "grafoUser3");
     string res = p.executaComandoProlog(userID + "");
     return res;
 }
Ejemplo n.º 2
0
 public string getCaminhoForte(int no1, int no2)
 {
     PrologExec p = new PrologExec(no1 + "_" + no2, "caminhoMaisForte");
     string res = p.executaComandoProlog(no1 + "," + no2 + ",P");
     return res;
 }
Ejemplo n.º 3
0
 public int tamanhoRedeUtilizador(int id)
 {
     PrologExec p = new PrologExec("" + id, "tamanhoRedeUtilizador");
     string res = p.executaComandoProlog("" + id);
     try
     {
         return Convert.ToInt32(res);
     }
     catch (FormatException e)
     {
         Console.WriteLine("Input string is not a sequence of digits.");
     }
     return -1;
 }
Ejemplo n.º 4
0
 public string xTagsEmComum(int id, int n)
 {
     ///*lista os amigos do User com N tags em comum*/
     PrologExec p = new PrologExec("" + id, "xTagsEmComum");
     string res = p.executaComandoProlog(id + "," + n);
     return res;
 }
Ejemplo n.º 5
0
 public string sugereAmigos(int id)
 {
     PrologExec p = new PrologExec(id + "", "recomendaAmizade");
     string res = p.executaComandoProlog(id + "");
     return res;
 }
Ejemplo n.º 6
0
 public string grafoAmigosComuns(int user1, int user2)
 {
     PrologExec p = new PrologExec(user1 + "_" + user2, "grafoAmigosComuns");
     string res = p.executaComandoProlog(user1 + "," + user2);
     return res;
 }
Ejemplo n.º 7
0
 public string getSeparacao(int no1, int no2)
 {
     PrologExec p = new PrologExec(no1 + "_" + no2, "separacao");
     string res = p.executaComandoProlog(no1 + "," + no2);
     return res;
 }
Ejemplo n.º 8
0
 public string getMenorCaminho(int no1, int no2)
 {
     PrologExec p = new PrologExec(no1 + "_" + no2, "menorCaminho");
     string res = p.executaComandoProlog(no1 + "," + no2 + ",P");
     return res;
 }
Ejemplo n.º 9
0
 public string getMavenOfTag(string tag)
 {
     PrologExec p = new PrologExec(tag + "", "maven");
     string res = p.executaComandoProlog(tag + "");
     return res;
 }