// Path: src/main/java/org/numenta/nupic/model/Cell.java
// public class Cell implements Comparable<Cell>, Serializable {
//     /** keep it simple */
//     private static final long serialVersionUID = 1L;
//     
//     /** This cell's index */
//     private final int index;
//     /** Remove boxing where necessary */
//     final Integer boxedIndex;
//     /** The owning {@link Column} */
//     private final Column column;
//     /** Cash this because Cells are immutable */
//     private final int hashcode;
//     
// 
//     /**
//      * Constructs a new {@code Cell} object
//      * @param column    the containing {@link Column}
//      * @param colSeq    this index of this {@code Cell} within its column
//      */
//     public Cell(Column column, int colSeq) {
//         this.column = column;
//         this.index = column.getIndex() * column.getNumCellsPerColumn() + colSeq;
//         this.boxedIndex = new Integer(index);
//         this.hashcode = hashCode();
//     }
// 
//     /**
//      * Returns this {@code Cell}'s index.
//      * @return
//      */
//     public int getIndex() {
//         return index;
//     }
// 
//     /**
//      * Returns the column within which this cell resides
//      * @return
//      */
//     public Column getColumn() {
//         return column;
//     }
// 
//     /**
//      * Returns the Set of {@link Synapse}s which have this cell
//      * as their source cells.
//      *  
//      * @param   c               the connections state of the temporal memory
//      *                          return an orphaned empty set.
//      * @return  the Set of {@link Synapse}s which have this cell
//      *          as their source cells.
//      */
//     public Set<Synapse> getReceptorSynapses(Connections c) {
//         return getReceptorSynapses(c, false);
//     }
// 
//     /**
//      * Returns the Set of {@link Synapse}s which have this cell
//      * as their source cells.
//      *  
//      * @param   c               the connections state of the temporal memory
//      * @param doLazyCreate      create a container for future use if true, if false
//      *                          return an orphaned empty set.
//      * @return  the Set of {@link Synapse}s which have this cell
//      *          as their source cells.
//      */
//     public Set<Synapse> getReceptorSynapses(Connections c, boolean doLazyCreate) {
//         return c.getReceptorSynapses(this, doLazyCreate);
//     }
// 
//     /**
//      * Returns a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      * 
//      * @param   c               the connections state of the temporal memory
//      * @param doLazyCreate      create a container for future use if true, if false
//      *                          return an orphaned empty set.
//      * @return  a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      */
//     public List<DistalDendrite> getSegments(Connections c) {
//         return getSegments(c, false);
//     }
// 
//     /**
//      * Returns a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      * 
//      * @param   c               the connections state of the temporal memory
//      * @param doLazyCreate      create a container for future use if true, if false
//      *                          return an orphaned empty set.
//      * @return  a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      */
//     public List<DistalDendrite> getSegments(Connections c, boolean doLazyCreate) {
//         return c.getSegments(this, doLazyCreate);
//     }
//     
//     /**
//      * {@inheritDoc}
//      */
//     public String toString() {
//         return String.valueOf(index);
//     }
// 
//     /**
//      * {@inheritDoc}
//      * 
//      * <em> Note: All comparisons use the cell's index only </em>
//      */
//     @Override
//     public int compareTo(Cell arg0) {
//         return boxedIndex.compareTo(arg0.boxedIndex);
//     }
// 
//     @Override
//     public int hashCode() {
//         if(hashcode == 0) {
//             final int prime = 31;
//             int result = 1;
//             result = prime * result + index;
//             return result;
//         }
//         return hashcode;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if(this == obj)
//             return true;
//         if(obj == null)
//             return false;
//         if(getClass() != obj.getClass())
//             return false;
//         Cell other = (Cell)obj;
//         if(index != other.index)
//             return false;
//         return true;
//     }
//     
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Set;
import org.junit.Test;
import org.numenta.nupic.algorithms.Classification;
import org.numenta.nupic.model.Cell;
import org.numenta.nupic.model.Column;
import org.numenta.nupic.model.ComputeCycle;
import org.numenta.nupic.util.NamedTuple;
package org.numenta.nupic.network;





public class ManualInputTest {

    /**
     * ManualInput retVal = new ManualInput();
        retVal.classifierInput = new HashMap<String, NamedTuple>(this.classifierInput);
        retVal.classifiers = this.classifiers;
        retVal.layerInput = this.layerInput;
        retVal.sdr = this.sdr;
        retVal.encoding = this.encoding;
        retVal.activeColumns = this.activeColumns;
        retVal.sparseActives = this.sparseActives;
        retVal.previousPrediction = this.previousPrediction;
        retVal.currentPrediction = this.currentPrediction;
        retVal.classification = this.classification;
        retVal.anomalyScore = this.anomalyScore;
        retVal.customObject = this.customObject;
     */
    @Test
    public void testCopy() {
        HashMap<String, NamedTuple> classifierInput = new HashMap<>();
        NamedTuple classifiers = new NamedTuple(new String[] { "one", "two" }, 1, 2);
        Object layerInput = new Object();
        int[] sdr = new int[] { 20 };
        int[] encoding = new int[40];
        int[] activeColumns = new int[25];
        int[] sparseActives = new int[2];
// Path: src/main/java/org/numenta/nupic/model/Cell.java
// public class Cell implements Comparable<Cell>, Serializable {
//     /** keep it simple */
//     private static final long serialVersionUID = 1L;
//     
//     /** This cell's index */
//     private final int index;
//     /** Remove boxing where necessary */
//     final Integer boxedIndex;
//     /** The owning {@link Column} */
//     private final Column column;
//     /** Cash this because Cells are immutable */
//     private final int hashcode;
//     
// 
//     /**
//      * Constructs a new {@code Cell} object
//      * @param column    the containing {@link Column}
//      * @param colSeq    this index of this {@code Cell} within its column
//      */
//     public Cell(Column column, int colSeq) {
//         this.column = column;
//         this.index = column.getIndex() * column.getNumCellsPerColumn() + colSeq;
//         this.boxedIndex = new Integer(index);
//         this.hashcode = hashCode();
//     }
// 
//     /**
//      * Returns this {@code Cell}'s index.
//      * @return
//      */
//     public int getIndex() {
//         return index;
//     }
// 
//     /**
//      * Returns the column within which this cell resides
//      * @return
//      */
//     public Column getColumn() {
//         return column;
//     }
// 
//     /**
//      * Returns the Set of {@link Synapse}s which have this cell
//      * as their source cells.
//      *  
//      * @param   c               the connections state of the temporal memory
//      *                          return an orphaned empty set.
//      * @return  the Set of {@link Synapse}s which have this cell
//      *          as their source cells.
//      */
//     public Set<Synapse> getReceptorSynapses(Connections c) {
//         return getReceptorSynapses(c, false);
//     }
// 
//     /**
//      * Returns the Set of {@link Synapse}s which have this cell
//      * as their source cells.
//      *  
//      * @param   c               the connections state of the temporal memory
//      * @param doLazyCreate      create a container for future use if true, if false
//      *                          return an orphaned empty set.
//      * @return  the Set of {@link Synapse}s which have this cell
//      *          as their source cells.
//      */
//     public Set<Synapse> getReceptorSynapses(Connections c, boolean doLazyCreate) {
//         return c.getReceptorSynapses(this, doLazyCreate);
//     }
// 
//     /**
//      * Returns a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      * 
//      * @param   c               the connections state of the temporal memory
//      * @param doLazyCreate      create a container for future use if true, if false
//      *                          return an orphaned empty set.
//      * @return  a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      */
//     public List<DistalDendrite> getSegments(Connections c) {
//         return getSegments(c, false);
//     }
// 
//     /**
//      * Returns a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      * 
//      * @param   c               the connections state of the temporal memory
//      * @param doLazyCreate      create a container for future use if true, if false
//      *                          return an orphaned empty set.
//      * @return  a {@link List} of this {@code Cell}'s {@link DistalDendrite}s
//      */
//     public List<DistalDendrite> getSegments(Connections c, boolean doLazyCreate) {
//         return c.getSegments(this, doLazyCreate);
//     }
//     
//     /**
//      * {@inheritDoc}
//      */
//     public String toString() {
//         return String.valueOf(index);
//     }
// 
//     /**
//      * {@inheritDoc}
//      * 
//      * <em> Note: All comparisons use the cell's index only </em>
//      */
//     @Override
//     public int compareTo(Cell arg0) {
//         return boxedIndex.compareTo(arg0.boxedIndex);
//     }
// 
//     @Override
//     public int hashCode() {
//         if(hashcode == 0) {
//             final int prime = 31;
//             int result = 1;
//             result = prime * result + index;
//             return result;
//         }
//         return hashcode;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if(this == obj)
//             return true;
//         if(obj == null)
//             return false;
//         if(getClass() != obj.getClass())
//             return false;
//         Cell other = (Cell)obj;
//         if(index != other.index)
//             return false;
//         return true;
//     }
//     
// }


// Path: src/test/java/org/numenta/nupic/network/ManualInputTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Set;
import org.junit.Test;
import org.numenta.nupic.algorithms.Classification;
import org.numenta.nupic.model.Cell;
import org.numenta.nupic.model.Column;
import org.numenta.nupic.model.ComputeCycle;
import org.numenta.nupic.util.NamedTuple;

package org.numenta.nupic.network;





public class ManualInputTest {

    /**
     * ManualInput retVal = new ManualInput();
        retVal.classifierInput = new HashMap<String, NamedTuple>(this.classifierInput);
        retVal.classifiers = this.classifiers;
        retVal.layerInput = this.layerInput;
        retVal.sdr = this.sdr;
        retVal.encoding = this.encoding;
        retVal.activeColumns = this.activeColumns;
        retVal.sparseActives = this.sparseActives;
        retVal.previousPrediction = this.previousPrediction;
        retVal.currentPrediction = this.currentPrediction;
        retVal.classification = this.classification;
        retVal.anomalyScore = this.anomalyScore;
        retVal.customObject = this.customObject;
     */
    @Test
    public void testCopy() {
        HashMap<String, NamedTuple> classifierInput = new HashMap<>();
        NamedTuple classifiers = new NamedTuple(new String[] { "one", "two" }, 1, 2);
        Object layerInput = new Object();
        int[] sdr = new int[] { 20 };
        int[] encoding = new int[40];
        int[] activeColumns = new int[25];
        int[] sparseActives = new int[2];
        Set<Cell> activeCells = new LinkedHashSet<>(); activeCells.add(new Cell(new Column(4, 0), 1));