• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

numenta / htm.java / #1205

26 Jan 2015 12:57PM UTC coverage: 14.409% (+0.005%) from 14.404%
#1205

push

David Ray
Merge pull request #168 from cogmission/network_api_work

testing the RNG is not part of the scope

718 of 4983 relevant lines covered (14.41%)

0.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/org/numenta/nupic/model/Segment.java
1
/* ---------------------------------------------------------------------
2
 * Numenta Platform for Intelligent Computing (NuPIC)
3
 * Copyright (C) 2014, Numenta, Inc.  Unless you have an agreement
4
 * with Numenta, Inc., for a separate license for this software code, the
5
 * following terms and conditions apply:
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License version 3 as
9
 * published by the Free Software Foundation.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 * See the GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program.  If not, see http://www.gnu.org/licenses.
18
 *
19
 * http://numenta.org/licenses/
20
 * ---------------------------------------------------------------------
21
 */
22

23
package org.numenta.nupic.model;
24

25
import java.util.List;
26

27
import org.numenta.nupic.Connections;
28

29
/**
30
 * For now simply a marker interface
31
 */
32
public abstract class Segment {
×
33
        /**
34
     * Creates and returns a newly created {@link Synapse} with the specified
35
     * source cell, permanence, and index.
36
     * 
37
     * IMPORTANT:         For DistalDendrites, there is only one synapse per pool, so the
38
     *                                 synapse's index doesn't really matter (in terms of tracking its
39
     *                                 order within the pool. In that case, the index is a global counter
40
     *                                 of all distal dendrite synapses.
41
     * 
42
     *                                 For ProximalDendrites, there are many synapses within a pool, and in
43
     *                                 that case, the index specifies the synapse's sequence order within
44
     *                                 the pool object, and may be referenced by that index.
45
     * 
46
     * @param c             the connections state of the temporal memory
47
     * @param sourceCell    the source cell which will activate the new {@code Synapse}
48
     * @param pool                    the new {@link Synapse}'s pool for bound variables.
49
     * @param index         the new {@link Synapse}'s index.
50
     * @param inputIndex        the index of this {@link Synapse}'s input; be it a Cell or InputVector bit.
51
     * 
52
     * @return
53
     */
54
    public Synapse createSynapse(Connections c, List<Synapse> syns, Cell sourceCell, Pool pool, int index, int inputIndex) {
55
        Synapse s = new Synapse(c, sourceCell, this, pool, index, inputIndex);
×
56
        syns.add(s);
×
57
        return s;
×
58
    }
59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc