Skip to content

Commit

Permalink
Implemented JavaTrieParetoFractionRemove.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Jan 29, 2017
1 parent ff78506 commit 9b52df5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions JavaTriesWithFrequencies.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc.

JavaTrieThresholdRemove::usage = "Remove nodes that have values below (or above) a threshold."

JavaTrieParetoFractionRemove::usage = "Remove nodes that have values below (or above) thresholds derived\
from a specified Pareto fraction."

JavaTrieToJSON::usage = "Converts a Java trie to a corresponding JSON expression."

Begin["`Private`"]
Expand Down Expand Up @@ -320,6 +323,19 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc.
JavaTrieThresholdRemove[jTr_?JavaObjectQ, threshold_?NumericQ, postfix_String] :=
TrieFunctions`removeByThreshold[jTr, threshold, True, postfix];

Clear[JavaTrieParetoFractionRemove]
JavaTrieParetoFractionRemove[jTr_?JavaObjectQ, paretoFraction_?NumericQ, removeBottomElementsQ:(True|False), postfix_String ] :=
TrieFunctions`removeByParetoFraction[jTr, paretoFraction, removeBottomElementsQ, postfix];

JavaTrieParetoFractionRemove[jTr_?JavaObjectQ, paretoFraction_?NumericQ, removeBottomElementsQ:(True|False) ] :=
TrieFunctions`removeByParetoFraction[jTr, paretoFraction, removeBottomElementsQ];

JavaTrieParetoFractionRemove[jTr_?JavaObjectQ, paretoFraction_?NumericQ] :=
TrieFunctions`removeByParetoFraction[jTr, paretoFraction];

JavaTrieParetoFractionRemove[jTr_?JavaObjectQ, paretoFraction_?NumericQ, postfix_String] :=
TrieFunctions`removeByParetoFraction[jTr, paretoFraction, True, postfix];

End[] (* `Private` *)

EndPackage[]

0 comments on commit 9b52df5

Please sign in to comment.