|
56 | 56 | import org.numenta.nupic.util.FlatMatrix;
|
57 | 57 | import org.numenta.nupic.util.SparseMatrix;
|
58 | 58 | import org.numenta.nupic.util.SparseObjectMatrix;
|
| 59 | +import org.numenta.nupic.util.Topology; |
59 | 60 | import org.numenta.nupic.util.Tuple;
|
60 | 61 | import org.numenta.nupic.util.UniversalRandom;
|
61 | 62 |
|
@@ -112,7 +113,11 @@ public class Connections implements Persistable {
|
112 | 113 |
|
113 | 114 | public double[] boostedOverlaps;
|
114 | 115 | public int[] overlaps;
|
115 |
| - |
| 116 | + |
| 117 | + /** Manages input neighborhood transformations */ |
| 118 | + private Topology inputTopology; |
| 119 | + /** Manages column neighborhood transformations */ |
| 120 | + private Topology columnTopology; |
116 | 121 | /** A matrix representing the shape of the input. */
|
117 | 122 | protected SparseMatrix<?> inputMatrix;
|
118 | 123 | /**
|
@@ -153,8 +158,8 @@ public class Connections implements Persistable {
|
153 | 158 |
|
154 | 159 | private double[] overlapDutyCycles;
|
155 | 160 | private double[] activeDutyCycles;
|
156 |
| - private double[] minOverlapDutyCycles; |
157 |
| - private double[] minActiveDutyCycles; |
| 161 | + private volatile double[] minOverlapDutyCycles; |
| 162 | + private volatile double[] minActiveDutyCycles; |
158 | 163 | private double[] boostFactors;
|
159 | 164 |
|
160 | 165 | /////////////////////////////////////// Temporal Memory Vars ///////////////////////////////////////////
|
@@ -380,6 +385,44 @@ public void setMemory(SparseObjectMatrix<Column> mem) {
|
380 | 385 | public SparseObjectMatrix<Column> getMemory() {
|
381 | 386 | return memory;
|
382 | 387 | }
|
| 388 | + |
| 389 | + /** |
| 390 | + * Returns the {@link Topology} overseeing input |
| 391 | + * neighborhoods. |
| 392 | + * @return |
| 393 | + */ |
| 394 | + public Topology getInputTopology() { |
| 395 | + return inputTopology; |
| 396 | + } |
| 397 | + |
| 398 | + /** |
| 399 | + * Sets the {@link Topology} overseeing input |
| 400 | + * neighborhoods. |
| 401 | + * |
| 402 | + * @param topology the input Topology |
| 403 | + */ |
| 404 | + public void setInputTopology(Topology topology) { |
| 405 | + this.inputTopology = topology; |
| 406 | + } |
| 407 | + |
| 408 | + /** |
| 409 | + * Returns the {@link Topology} overseeing {@link Column} |
| 410 | + * neighborhoods. |
| 411 | + * @return |
| 412 | + */ |
| 413 | + public Topology getColumnTopology() { |
| 414 | + return columnTopology; |
| 415 | + } |
| 416 | + |
| 417 | + /** |
| 418 | + * Sets the {@link Topology} overseeing {@link Column} |
| 419 | + * neighborhoods. |
| 420 | + * |
| 421 | + * @param topology the column Topology |
| 422 | + */ |
| 423 | + public void setColumnTopology(Topology topology) { |
| 424 | + this.columnTopology = topology; |
| 425 | + } |
383 | 426 |
|
384 | 427 | /**
|
385 | 428 | * Returns the input column mapping
|
@@ -1071,6 +1114,10 @@ public double[] getOverlapDutyCycles() {
|
1071 | 1114 | return overlapDutyCycles;
|
1072 | 1115 | }
|
1073 | 1116 |
|
| 1117 | + /** |
| 1118 | + * Sets the overlap duty cycles |
| 1119 | + * @param overlapDutyCycles |
| 1120 | + */ |
1074 | 1121 | public void setOverlapDutyCycles(double[] overlapDutyCycles) {
|
1075 | 1122 | this.overlapDutyCycles = overlapDutyCycles;
|
1076 | 1123 | }
|
|
0 commit comments