Skip to content

Commit

Permalink
Implemented JavaTriePrune in JavaTriesWithFrequencies.m .
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Oct 11, 2017
1 parent 76431a9 commit ae1919e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions JavaTriesWithFrequencies.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc.

JavaTrieRegexRemove::usage = "Remove nodes that have keys adhering to a regex expression."

JavaTriePrune::usage = "Prune a trie to a specified maximum level. The root is level 0."

JavaTrieShrink::usage = "JavaTrieShrink[ jTr_, sep_String:\"\"] concatenates the \"single path\" nodes\
in the trie jTr using the given separator sep."

Expand Down Expand Up @@ -383,6 +385,10 @@ Mathematica is (C) Copyright 1988-2017 Wolfram Research, Inc.
JavaTrieParetoFractionRemove[jTr_?JavaObjectQ, paretoFraction_?NumericQ, postfix_String] :=
TrieFunctions`removeByParetoFraction[jTr, paretoFraction, True, postfix];

Clear[JavaTriePrune]
JavaTriePrune[jTr_?JavaObjectQ, maxLevel_Integer ] :=
TrieFunctions`prune[jTr, maxLevel];

Clear[JavaTrieRandomChoice]
Options[JavaTrieRandomChoice] = { "Weighted"->True };
JavaTrieRandomChoice[jTr_?JavaObjectQ, opts:OptionsPattern[] ] :=
Expand Down

0 comments on commit ae1919e

Please sign in to comment.