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

📄 pattern.java

📁 用Java实现的多层BP神经网络
💻 JAVA
字号:
/*  AI ANN Backpropagation    Copyright (C) 2002-2003  Wim Gillis <d.e.m@gmx.net>    http://sourceforge.net/projects/crap    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program (see COPYING); if not, check out     http://www.gnu.org/licenses/gpl.html    or write to the Free Software Foundation,     Inc., 59 Temple Place, Suite 330, Boston,     MA  02111-1307  USA*/package cx.ma.ai.ann.backprop;import java.io.Serializable;public class Pattern implements Serializable{    private double[] in;    private double[] out;        public Pattern(double[] input, double[] output) {        in = input;         out = output;    }        public double getInput(int index){        return in[index];    }        public int getNoOfInputs(){        return in.length;    }        public double getOutput(int index){        return out[index];    }        public int getNoOfOutputs(){        return out.length;    }        public double[] getIn(){        return in;    }        public double[] getOut(){        return out;    }        public String toString(){        String ret = "in: ";        for (int i = 0; i < in.length; ++i)            ret += in[i] + " ";        ret += "\nout: ";        for (int i = 0; i < out.length; ++i)            ret += out[i] + " ";        return ret;    }}

⌨️ 快捷键说明

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