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

📄 jsommap.java

📁 Kohonen网络的学习过程可描述为:对于每一个网络的输入
💻 JAVA
字号:
package fi.javasom.jsom;
/**
 * This is the main container for the whole final map.
 *
 *  Copyright (C) 2001  Tomi Suuronen
 *
 *  @version 1.0
 *
 *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

import java.util.Vector;

import fi.javasom.jsom.SomNode;

public class JsomMap
{
	private String fileCode; // identification code for this set of input data (from meta ELEMENT code ATTRIBUTE)
	private String fileDate; // the date when the input data .xml-file was created for this map
	private String projectName; //name of this project
	private String projectCode; // code of this project
	private Vector authorName; // name od the author
	private Vector authorOrg; // organization of the author

	/**
	 * Main constructor.
	*/
	public JsomMap()
	{
		fileCode = "";
		fileDate = "";
		projectName = "";
		projectCode = "";
		authorName = new Vector(0,1);
		authorOrg = new Vector(0,1);
	}

	/**
	 * Sets the identification code for this set of input data .xml-file.
	 *
	 * @param String code - code from .xml-file.
	*/
	public void setCode(String code)
	{
		fileCode = code;
	}

	/**
	 * Sets the date when the input data .xml-file was created.
	 *
	 * @param String date - date when the .xml-file was created.
	*/
	public void setDate(String date)
	{
		fileDate = date;
	}

	/**
	 * Sets the project information.
	 *
	 * @param String name - name of the project.
	 * @param String code - identification code of this project.
	*/
	public void setProject(String name,String code)
	{
		projectName = name;
		projectCode = code;
	}

	/**
	 * Adds the .xml-file author who created it.
	 *
	 * @param String name - name of the author.
	 * @param String organization - organization of this author.
	*/
	public void addAuthor(String name, String organization)
	{
		authorName.addElement(name);
		authorOrg.addElement(organization);
	}

	/**
	 * Returns the number of authors in this map.
	 *
	 * @return int - number of authors.
	*/
	public int getAuthorCount()
	{
		return authorName.size();
	}

	/**
	 * Returns the name of the author at specific index.
	 *
	 * @param int index - index number .
	 * @return String - name of the author.
	*/
	public String getAuthorNameAt(int index)
	{
		return authorName.elementAt(index).toString();
	}

	/**
	 * Returns the file code.
	 *
	 * @return String - code of the .xml-file.
	*/
	public String getFileCode()
	{
		return fileCode;
	}

	/**
	 * Returns the date when the .xml-file was created.
	 *
	 * @return String - code of the .xml-file.
	*/
	public String getFileDate()
	{
		return fileDate;
	}

	/**
	 * Returns the name of the project in which this .xml-file is part of.
	 *
	 * @return String - name of the project.
	*/
	public String getProjectName()
	{
		return projectName;
	}

	/**
	 * Returns the code of the project in which this .xml-file is part of.
	 *
	 * @return String - code of the project.
	*/
	public String getProjectCode()
	{
		return projectCode;
	}

	/**
	 * Returns the organization of the author at specific index.
	 *
	 * @param int index - index number .
	 * @return String - organization of the author.
	*/
	public String getAuthorOrganizationAt(int index)
	{
		return authorOrg.elementAt(index).toString();
	}
}

⌨️ 快捷键说明

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