All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aima.core.learning.neural.NNConfig Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
package aima.core.learning.neural;

import java.util.Hashtable;

/**
 * A holder for config data for neural networks and possibly for other learning
 * systems.
 * 
 * @author Ravi Mohan
 * 
 */
public class NNConfig {
	private final Hashtable hash;

	public NNConfig(Hashtable hash) {
		this.hash = hash;
	}

	public NNConfig() {
		this.hash = new Hashtable();
	}

	public double getParameterAsDouble(String key) {

		return (Double) hash.get(key);
	}

	public int getParameterAsInteger(String key) {

		return (Integer) hash.get(key);
	}

	public void setConfig(String key, Double value) {
		hash.put(key, value);
	}

	public void setConfig(String key, int value) {
		hash.put(key, value);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy