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

Method applyFunction

JSAT/src/jsat/linear/SparseVector.java:854–864  ·  view source on GitHub ↗
(Function f)

Source from the content-addressed store, hash-verified

852 }
853
854 @Override
855 public void applyFunction(Function f)
856 {
857 if(f.f(0.0) != 0.0)
858 super.applyFunction(f);
859 else//Then we only need to apply it to the non zero values!
860 {
861 for(int i = 0; i < used; i++)
862 values[i] = f.f(values[i]);
863 }
864 }
865
866 @Override
867 public void applyIndexFunction(IndexFunction f)

Callers

nothing calls this directly

Calls 1

fMethod · 0.65

Tested by

no test coverage detected