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

Method sampleVec

JSAT/test/jsat/NormalClampedSample.java:45–52  ·  view source on GitHub ↗
(int numSamples, Random rand)

Source from the content-addressed store, hash-verified

43 }
44
45 @Override
46 public DenseVector sampleVec(int numSamples, Random rand)
47 {
48 DenseVector ret = super.sampleVec(numSamples, rand);
49 for(int i = 0; i < ret.length(); i++)
50 ret.set(i, Math.max(min, Math.min(max, ret.get(i))));
51 return ret;
52 }
53
54}

Callers 5

testSampleAndStatsMethod · 0.45
testSampleMethod · 0.45
testSampleMethod · 0.45
testSampleMethod · 0.45
testSetSmoothingMethod · 0.45

Calls 5

lengthMethod · 0.95
setMethod · 0.95
getMethod · 0.95
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected