Example #1
0
  public static void main(String[] args) throws FileNotFoundException {

    Polinomio ayuda =
        new Polinomio(
            "2730533037212634637604676518871272610568817116641122971949417600595254297693", 10, 6);
    ayuda.genera_llaves("prueba");
    BigDecimal[][] aux2 = new BigDecimal[6][2];
    Scanner sc = new Scanner(new File("prueba.frg"));
    sc.nextLine();
    int idx = 3;
    for (int m = 0; m < idx; m++) sc.nextLine();
    for (int i = 0; i < 6; i++) {
      String[] tmp = sc.nextLine().split(",");
      aux2[i][0] = new BigDecimal(tmp[0].trim());
      aux2[i][1] = new BigDecimal(tmp[1].trim());
    }
    System.out.println("la original        " + ayuda.clave);
    System.out.println("la que me da       " + Polinomio.recupera_Polinomio(aux2));
  }