示例#1
0
  /**
   * do change kernel events
   *
   * @param index : kernel index in matched kernel list
   * @return kernel json in 30%
   */
  public String changeKernel(int index) {

    // System.out.println("[change kernel]"+index);
    matchKernelList = kernelMatch.getOneMatchKernel(index);
    kernelOperation.init(searchAuthorList, matchKernelList);
    return kernelOperation.toJSON(30);
  }
示例#2
0
  /** init the model init the matched kernel list and search author list */
  public void init(String kernelfile, List<Integer> searchAuthorList) {

    this.searchAuthorList = searchAuthorList;
    kernelMatch = new KernelMatch();
    matchKernelList = kernelMatch.getOneMatchKernel(kernelfile, searchAuthorList, 0);
    kernelOperation = new KernelOperation();
    kernelOperation.init(searchAuthorList, matchKernelList);
  }
示例#3
0
 public boolean isOverMaxID() {
   return kernelOperation.isOverMAXID();
 }
示例#4
0
 public boolean isAddNode() {
   return kernelOperation.isAddNode();
 }
示例#5
0
 /**
  * @param count : percent node number of the kernel
  * @return new kernel content
  */
 public String update(int count) {
   // System.out.println("[Kernel Model update]"+count);
   return kernelOperation.update(count);
 }
示例#6
0
  /**
   * @param count percent node number of the matched kernel
   * @return kernel json
   */
  public String toJSON(int count) {

    return kernelOperation.toJSON(count);
  }