// Path: src/main/java/net/jlibnoise/Module.java
// public abstract class Module {
// 	protected Module[] sourceModule;
// 
// 	public Module(int sourceModuleCount) {
// 		sourceModule = null;
// 
// 		// Create an array of pointers to all source modules required by this
// 		// noise module.  Set these pointers to NULL.
// 		if (sourceModuleCount > 0) {
// 			sourceModule = new Module[sourceModuleCount];
// 			for (int i = 0; i < sourceModuleCount; i++) {
// 				sourceModule[i] = null;
// 			}
// 		} else {
// 			sourceModule = null;
// 		}
// 
// 	}
// 
//     /**
//      * Returns a reference to a source module connected to this noise module.
//      * <p/>
//      * Each noise module requires the attachment of a certain number of
//      * source modules before an application can call the getValue()
//      * method.
//      *
//      * @param index The index value assigned to the source module.
//      * @return A reference to the source module.
//      * @throws NoModuleException See the preconditions for more information.
//      * @pre The index value ranges from 0 to one less than the number of
//      * source modules required by this noise module.
//      * @pre A source module with the specified index value has been added
//      * to this noise module via a call to SetSourceModule().
//      */
// 	public Module getSourceModule(int index) {
// 		if (index >= getSourceModuleCount() || index < 0 || sourceModule[index] == null) {
// 			throw new NoModuleException();
// 		}
// 		return (sourceModule[index]);
// 
// 	}
// 
//     /**
//      * Connects a source module to this noise module.
//      *
//      * A noise module mathematically combines the output values from the
//      * source modules to generate the value returned by getValue().
//      *
//      * The index value to assign a source module is a unique identifier
//      * for that source module.  If an index value has already been
//      * assigned to a source module, this noise module replaces the old
//      * source module with the new source module.
//      *
//      * Before an application can call the GetValue() method, it must
//      * first connect all required source modules.  To determine the
//      * number of source modules required by this noise module, call the
//      * getSourceModuleCount() method.
//      *
//      * This source module must exist throughout the lifetime of this
//      * noise module unless another source module replaces that source
//      * module.
//      *
//      * A noise module does not modify a source module; it only modifies
//      * its output values.
//      * @param index An index value to assign to this source module.
//      * @param sourceModule The source module to attach.
//      * @throws IllegalArgumentException An invalid parameter was
//      * specified; see the preconditions for more information.
//      * @pre The index value ranges from 0 to one less than the number of
//      * source modules required by this noise module.
//      */
// 	public void setSourceModule(int index, Module sourceModule) {
// 		if (this.sourceModule == null)
// 			return;
// 		if (index >= getSourceModuleCount() || index < 0) {
// 			throw new IllegalArgumentException("Index must be between 0 and getSourceModuleCount()");
// 		}
// 		this.sourceModule[index] = sourceModule;
// 	}
// 
//     /**
//      * Returns the number of source modules required by this noise
//      * module.
//      *
//      * @return The number of source modules required by this noise module.
//      */
// 	public abstract int getSourceModuleCount();
// 
//     /**
//      * Generates an output value given the coordinates of the specified
//      * input value.
//      * <p/>
//      * Before an application can call this method, it must first connect
//      * all required source modules via the SetSourceModule() method.  If
//      * these source modules are not connected to this noise module, this
//      * method raises a debug assertion.
//      * <p/>
//      * To determine the number of source modules required by this noise
//      * module, call the getSourceModuleCount() method.
//      *
//      *
//      * @param x The @a x coordinate of the input value.
//      * @param y The @a y coordinate of the input value.
//      * @param z The @a z coordinate of the input value.
//      * @return The output value.
//      * @pre All source modules required by this noise module have been
//      * passed to the SetSourceModule() method.
//      */
// 	public abstract double getValue(double x, double y, double z);
// }
// 
// Path: src/main/java/net/jlibnoise/exception/NoModuleException.java
// public class NoModuleException extends NoiseException {
//     private static final long serialVersionUID = 1L;
// 
// }


import net.jlibnoise.Module;
import net.jlibnoise.exception.NoModuleException;
/* Copyright (C) 2011 Garrett Fleenor

 This library is free software; you can redistribute it and/or modify it
 under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation; either version 3.0 of the License, or (at
 your option) any later version.

 This library 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 Lesser General Public
 License (COPYING.txt) for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation,
 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 This is a port of libnoise ( http://libnoise.sourceforge.net/index.html ).  Original implementation by Jason Bevins

*/

package net.jlibnoise.combiner;


public class Power extends Module {

	public Power() {
// Path: src/main/java/net/jlibnoise/Module.java
// public abstract class Module {
// 	protected Module[] sourceModule;
// 
// 	public Module(int sourceModuleCount) {
// 		sourceModule = null;
// 
// 		// Create an array of pointers to all source modules required by this
// 		// noise module.  Set these pointers to NULL.
// 		if (sourceModuleCount > 0) {
// 			sourceModule = new Module[sourceModuleCount];
// 			for (int i = 0; i < sourceModuleCount; i++) {
// 				sourceModule[i] = null;
// 			}
// 		} else {
// 			sourceModule = null;
// 		}
// 
// 	}
// 
//     /**
//      * Returns a reference to a source module connected to this noise module.
//      * <p/>
//      * Each noise module requires the attachment of a certain number of
//      * source modules before an application can call the getValue()
//      * method.
//      *
//      * @param index The index value assigned to the source module.
//      * @return A reference to the source module.
//      * @throws NoModuleException See the preconditions for more information.
//      * @pre The index value ranges from 0 to one less than the number of
//      * source modules required by this noise module.
//      * @pre A source module with the specified index value has been added
//      * to this noise module via a call to SetSourceModule().
//      */
// 	public Module getSourceModule(int index) {
// 		if (index >= getSourceModuleCount() || index < 0 || sourceModule[index] == null) {
// 			throw new NoModuleException();
// 		}
// 		return (sourceModule[index]);
// 
// 	}
// 
//     /**
//      * Connects a source module to this noise module.
//      *
//      * A noise module mathematically combines the output values from the
//      * source modules to generate the value returned by getValue().
//      *
//      * The index value to assign a source module is a unique identifier
//      * for that source module.  If an index value has already been
//      * assigned to a source module, this noise module replaces the old
//      * source module with the new source module.
//      *
//      * Before an application can call the GetValue() method, it must
//      * first connect all required source modules.  To determine the
//      * number of source modules required by this noise module, call the
//      * getSourceModuleCount() method.
//      *
//      * This source module must exist throughout the lifetime of this
//      * noise module unless another source module replaces that source
//      * module.
//      *
//      * A noise module does not modify a source module; it only modifies
//      * its output values.
//      * @param index An index value to assign to this source module.
//      * @param sourceModule The source module to attach.
//      * @throws IllegalArgumentException An invalid parameter was
//      * specified; see the preconditions for more information.
//      * @pre The index value ranges from 0 to one less than the number of
//      * source modules required by this noise module.
//      */
// 	public void setSourceModule(int index, Module sourceModule) {
// 		if (this.sourceModule == null)
// 			return;
// 		if (index >= getSourceModuleCount() || index < 0) {
// 			throw new IllegalArgumentException("Index must be between 0 and getSourceModuleCount()");
// 		}
// 		this.sourceModule[index] = sourceModule;
// 	}
// 
//     /**
//      * Returns the number of source modules required by this noise
//      * module.
//      *
//      * @return The number of source modules required by this noise module.
//      */
// 	public abstract int getSourceModuleCount();
// 
//     /**
//      * Generates an output value given the coordinates of the specified
//      * input value.
//      * <p/>
//      * Before an application can call this method, it must first connect
//      * all required source modules via the SetSourceModule() method.  If
//      * these source modules are not connected to this noise module, this
//      * method raises a debug assertion.
//      * <p/>
//      * To determine the number of source modules required by this noise
//      * module, call the getSourceModuleCount() method.
//      *
//      *
//      * @param x The @a x coordinate of the input value.
//      * @param y The @a y coordinate of the input value.
//      * @param z The @a z coordinate of the input value.
//      * @return The output value.
//      * @pre All source modules required by this noise module have been
//      * passed to the SetSourceModule() method.
//      */
// 	public abstract double getValue(double x, double y, double z);
// }
// 
// Path: src/main/java/net/jlibnoise/exception/NoModuleException.java
// public class NoModuleException extends NoiseException {
//     private static final long serialVersionUID = 1L;
// 
// }


// Path: src/main/java/net/jlibnoise/combiner/Power.java
import net.jlibnoise.Module;
import net.jlibnoise.exception.NoModuleException;

/* Copyright (C) 2011 Garrett Fleenor

 This library is free software; you can redistribute it and/or modify it
 under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation; either version 3.0 of the License, or (at
 your option) any later version.

 This library 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 Lesser General Public
 License (COPYING.txt) for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation,
 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 This is a port of libnoise ( http://libnoise.sourceforge.net/index.html ).  Original implementation by Jason Bevins

*/

package net.jlibnoise.combiner;


public class Power extends Module {

	public Power() {
		super(2);