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

📄 moduleentry.java

📁 JaNet: Java Neural Network Toolkit resume: A well documented toolkit for designing and training, a
💻 JAVA
字号:
////////////////////////////////////////////////////////////////////////////////////  //  //  Copyright (C) 1996 L.  Patocchi & W.Gander////  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;  either  version 2 of the License, or (at your option)//  any later version.////  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; if not, write to the Free Software  Foundation, Inc., 675 Mass//  Ave, Cambridge, MA 02139, USA.////  Contacts://  //    Project Supervisor//      W.Hett       hew@info.isbiel.ch//  //    Authors//      W.Gander     gandw@info.isbiel.ch//      L.Patocchi   patol@info.isbiel.ch////  Documentation can be found at:////      http://www.isbiel.ch/Projects/janet/index.html////////////////////////////////////////////////////////////////////////////////////////// File : ModuleEntry.java///*	jaNet - A Neural Network Toolkit for Java	-----------------------------------------	Author :		L.Patocchi	Modifications :	18.09.1996	Filename :		ModuleEntry.java	This class is used to provide basic network data (path/file of the module, 	kind of network, class to load) to the main application jaNet in order to keep	this data for saving project in a file and be able to retrive it later.	(c) 1996 Biel School of Engineering */package jaNet;import java.io.*;public class ModuleEntry{	public String		fileName;	public String		pathName;	public ModuleTypes	classType;	public NNeMo		current;	// current instance in jaNet	public int			x,y;	public int			width,height;	public double		minDomain, maxDomain;	public String		patternPath = "";	public String		patternFile = "";		public ModuleEntry(String pathname, String filename, ModuleTypes classtype,NNeMo currentinstance) {		fileName	= filename;		pathName	= pathname;		classType	= classtype;		current		= currentinstance;	}	public ModuleEntry(RandomAccessFile raf) throws IOException {		read(raf);	}	public boolean canBeSaved(){		return !(fileName == null || pathName == null);	}	public void write(RandomAccessFile raf) throws IOException {				if(fileName == null || pathName == null){			throw new IOException("Incomplete data in ModuleEntry, cannot write to file.");		}		raf.writeUTF(pathName);		raf.writeUTF(fileName);		raf.writeUTF(patternPath);		raf.writeUTF(patternFile);		raf.writeInt(x);		raf.writeInt(y);		raf.writeDouble(minDomain);		raf.writeDouble(maxDomain);		raf.writeInt(width);		raf.writeInt(height);		classType.writeModuleType(raf);	}	public void read(RandomAccessFile raf) throws IOException {		pathName = raf.readUTF();		fileName = raf.readUTF();		patternPath = raf.readUTF();		patternFile = raf.readUTF();		x = raf.readInt();		y = raf.readInt();		minDomain = raf.readDouble();		maxDomain = raf.readDouble();		width = raf.readInt();		height = raf.readInt();		classType = new ModuleTypes(raf);	}}

⌨️ 快捷键说明

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