📄 taskfactory.java
字号:
/* * TaskFactory.java * * Created on 6 luglio 2004, 22.36 */package org.joone.dte;import java.util.List;import org.joone.net.NeuralNet;/** This interface must be implemented by any class that is capable to create * tasks to elaborate (i.e. neural nets to train) starting from * external parameters written in some formalism or language (e.g. XML) * After the TaskFactory is created, the DTE calls on it the initialize() method, * and then, for each neural network it needs to elaborate, the getNextTask() * is called, until it returns null. * The developer has two possibilities, based on the creation mechanism he * wants to implement: * 1 - In order to avoid to occupy many memory, the initialize method * doesn't create neural networks, as they are created only when getNextTask * is called. (Preferred) * 2 - The initialize method creates all the requested networks by putting * them into a list. The getNextTask method gets the next neural network * from that list. (Use only when it's impossibile to generate the * networks when requested) * Regardless the implemented creation strategy, the getTotTasks must return * the total number of neural networks it creates. * * @author paolo marrone */public interface TaskFactory { /** * Called by the Job to initialize the factory */ void initialize(); /** * Called to get the next Task in the list. * @return null if there aren't any tasks to generate */ NeuralNet getNextTask(); /** * Returns the total number of tasks will be generated */ int getTotTasks(); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -