⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 converterplugin.java

📁 一个纯java写的神经网络源代码
💻 JAVA
字号:
package org.joone.util;import org.joone.engine.*;import org.joone.net.*;import java.util.Vector;import org.joone.util.CSVParser;import java.util.*;import java.io.*;import org.joone.log.*;/**  * This abstract class must be extended to implement plug-ins for input data  * preprocessing. The objects extending this class can be inserted into objects  * that extend the <code>org.joone.io.StreamInputSynapse</code>. */public abstract class ConverterPlugIn extends AbstractConverterPlugIn {        /** The object used when logging debug, errors, warnings and info. */    private static final ILogger log = LoggerFactory.getLogger(ConverterPlugIn.class);        /** The Vector of input patterns which this converter must process. */    //private transient Vector InputVector;        /** The serial version of this object. */    private static final long serialVersionUID = 1698511686417967414L;        /** Flag indicating if every cycle the data should be preprocesed. */    private boolean applyEveryCycle;        /** The default constructor of the ConverterPlugIn. */    public ConverterPlugIn() {    }        /**      * Constructor of the ConverterPlugIn.      *     * @param anAdvancedSerieSelector     * @see AbstractConverterPlugIn#AbstractConverterPlugIn(String)     */    public ConverterPlugIn(String anAdvancedSerieSelector) {        super(anAdvancedSerieSelector);    }            /**     * This method is called at the start of a new cycle, and      * permit to apply the conversion for the components having     * the applyEveryCycle property set to true.     * This different entry point has been added in order to      * avoid to applying the conversion for plugins having     * the applyEveryCycle property set to false.     *     * @return true if the input buffer is changed     */    public boolean newCycle() {        boolean retValue = false;        if (isApplyEveryCycle()) {            retValue = apply();        }                if (getNextPlugIn() != null) {            ConverterPlugIn myPlugIn = (ConverterPlugIn)getNextPlugIn();            myPlugIn.setInputVector(getInputVector());            retValue = myPlugIn.newCycle() | retValue;        }        return retValue;    }        /**      * Getter for property applyEachCycle.     *     * @return Value of property applyEachCycle.     */    public boolean isApplyEveryCycle() {        return applyEveryCycle;    }        /**      * Setter for property applyEachCycle.     *     * @param anApplyEachCycle New value of property applyEachCycle.     */    public void setApplyEveryCycle(boolean anApplyEveryCycle) {        applyEveryCycle = anApplyEveryCycle;    }            private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {        in.defaultReadObject();        // To maintain the compatibility with the old saved classes        if (getAdvancedSerieSelector() == null)             setAdvancedSerieSelector(new String("1"));        if (getName() == null)            setName("InputPlugin 9");    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -