Skip to content

Commit

Permalink
Ported new duty cycle, and new mapPotential methods and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cogmission committed Oct 6, 2016
1 parent bd3677c commit 2cdcee1
Show file tree
Hide file tree
Showing 4 changed files with 604 additions and 488 deletions.
53 changes: 50 additions & 3 deletions src/main/java/org/numenta/nupic/Connections.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.numenta.nupic.util.FlatMatrix;
import org.numenta.nupic.util.SparseMatrix;
import org.numenta.nupic.util.SparseObjectMatrix;
import org.numenta.nupic.util.Topology;
import org.numenta.nupic.util.Tuple;
import org.numenta.nupic.util.UniversalRandom;

Expand Down Expand Up @@ -112,7 +113,11 @@ public class Connections implements Persistable {

public double[] boostedOverlaps;
public int[] overlaps;


/** Manages input neighborhood transformations */
private Topology inputTopology;
/** Manages column neighborhood transformations */
private Topology columnTopology;
/** A matrix representing the shape of the input. */
protected SparseMatrix<?> inputMatrix;
/**
Expand Down Expand Up @@ -153,8 +158,8 @@ public class Connections implements Persistable {

private double[] overlapDutyCycles;
private double[] activeDutyCycles;
private double[] minOverlapDutyCycles;
private double[] minActiveDutyCycles;
private volatile double[] minOverlapDutyCycles;
private volatile double[] minActiveDutyCycles;
private double[] boostFactors;

/////////////////////////////////////// Temporal Memory Vars ///////////////////////////////////////////
Expand Down Expand Up @@ -380,6 +385,44 @@ public void setMemory(SparseObjectMatrix<Column> mem) {
public SparseObjectMatrix<Column> getMemory() {
return memory;
}

/**
* Returns the {@link Topology} overseeing input
* neighborhoods.
* @return
*/
public Topology getInputTopology() {
return inputTopology;
}

/**
* Sets the {@link Topology} overseeing input
* neighborhoods.
*
* @param topology the input Topology
*/
public void setInputTopology(Topology topology) {
this.inputTopology = topology;
}

/**
* Returns the {@link Topology} overseeing {@link Column}
* neighborhoods.
* @return
*/
public Topology getColumnTopology() {
return columnTopology;
}

/**
* Sets the {@link Topology} overseeing {@link Column}
* neighborhoods.
*
* @param topology the column Topology
*/
public void setColumnTopology(Topology topology) {
this.columnTopology = topology;
}

/**
* Returns the input column mapping
Expand Down Expand Up @@ -1071,6 +1114,10 @@ public double[] getOverlapDutyCycles() {
return overlapDutyCycles;
}

/**
* Sets the overlap duty cycles
* @param overlapDutyCycles
*/
public void setOverlapDutyCycles(double[] overlapDutyCycles) {
this.overlapDutyCycles = overlapDutyCycles;
}
Expand Down
Loading

0 comments on commit 2cdcee1

Please sign in to comment.