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

Method next

JSAT/src/jsat/linear/Vec.java:1051–1069  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1049 }
1050
1051 @Override
1052 public IndexValue next()
1053 {
1054 if(nextNonZero == -1)
1055 return null;
1056 indexValue.setIndex(nextNonZero);
1057 indexValue.setValue(get(nextNonZero));
1058
1059 int i = nextNonZero+1;
1060 nextNonZero = -1;
1061 for(; i < magic.length(); i++ )
1062 if(get(i) != 0.0)
1063 {
1064 nextNonZero = i;
1065 break;
1066 }
1067
1068 return indexValue;
1069 }
1070
1071 @Override
1072 public void remove()

Callers 15

testIteratorMethod · 0.45
testIteratorMethod · 0.45
removeEvenByIteratorMethod · 0.45
testIteratorMethod · 0.45
removeEvenByIteratorMethod · 0.45
removeEvenByIteratorMethod · 0.45
testSetCMethod · 0.45

Calls 4

getMethod · 0.95
setIndexMethod · 0.80
setValueMethod · 0.45
lengthMethod · 0.45

Tested by 13

testIteratorMethod · 0.36
testIteratorMethod · 0.36
removeEvenByIteratorMethod · 0.36
testIteratorMethod · 0.36
removeEvenByIteratorMethod · 0.36
removeEvenByIteratorMethod · 0.36
testSetCMethod · 0.36