/** * 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); }
/** 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); }
public boolean isOverMaxID() { return kernelOperation.isOverMAXID(); }
public boolean isAddNode() { return kernelOperation.isAddNode(); }
/** * @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); }
/** * @param count percent node number of the matched kernel * @return kernel json */ public String toJSON(int count) { return kernelOperation.toJSON(count); }