MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / add

Method add

JSAT/src/jsat/utils/IntList.java:82–96  ·  view source on GitHub ↗

Operates exactly as #add(int, java.lang.Integer) @param index the index to add the value into @param element the value to add

(int index, int element)

Source from the content-addressed store, hash-verified

80 * @param element the value to add
81 */
82 public void add(int index, int element)
83 {
84 if (index == size())//special case, just appending
85 {
86 add(element);
87 }
88 else
89 {
90 boundsCheck(index);
91 enlargeIfNeeded(1);
92 System.arraycopy(array, index, array, index+1, end-index);
93 array[index] = element;
94 end++;
95 }
96 }
97
98 @Override
99 public void add(int index, Integer element)

Callers 15

testSplitListMethod · 0.95
testAdd_int_intMethod · 0.95
testSortDPMethod · 0.95
testSortFPMethod · 0.95
getMissingDroppedMethod · 0.95
addAllMethod · 0.95
rangeMethod · 0.95
learnNetworkMethod · 0.95
trainCMethod · 0.95
trainCMethod · 0.95
updateMethod · 0.95

Calls 3

sizeMethod · 0.95
boundsCheckMethod · 0.95
enlargeIfNeededMethod · 0.95

Tested by 4

testSplitListMethod · 0.76
testAdd_int_intMethod · 0.76
testSortDPMethod · 0.76
testSortFPMethod · 0.76