X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FFixedPenaltyScorer.java;h=3a3084143edf582c3271eabb67be99ec4e5b3142;hp=213ab4d490344e5e442a7682493a50720399cc19;hb=07d5d868dfe064aadb28a7f7ca6002c16be9723d;hpb=32973ea2749f8efd05b543dd774763513013b38b diff --git a/src/main/java/org/ldk/structs/FixedPenaltyScorer.java b/src/main/java/org/ldk/structs/FixedPenaltyScorer.java index 213ab4d4..3a308414 100644 --- a/src/main/java/org/ldk/structs/FixedPenaltyScorer.java +++ b/src/main/java/org/ldk/structs/FixedPenaltyScorer.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; /** - * [`Score`] implementation that uses a fixed penalty. + * [`ScoreLookUp`] implementation that uses a fixed penalty. */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class FixedPenaltyScorer extends CommonBase { @@ -51,14 +51,27 @@ public class FixedPenaltyScorer extends CommonBase { } /** - * Constructs a new Score which calls the relevant methods on this_arg. - * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is + * Constructs a new ScoreLookUp which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is */ - public Score as_Score() { - long ret = bindings.FixedPenaltyScorer_as_Score(this.ptr); + public ScoreLookUp as_ScoreLookUp() { + long ret = bindings.FixedPenaltyScorer_as_ScoreLookUp(this.ptr); Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - Score ret_hu_conv = new Score(null, ret); + ScoreLookUp ret_hu_conv = new ScoreLookUp(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; + return ret_hu_conv; + } + + /** + * Constructs a new ScoreUpdate which calls the relevant methods on this_arg. + * This copies the `inner` pointer in this_arg and thus the returned ScoreUpdate must be freed before this_arg is + */ + public ScoreUpdate as_ScoreUpdate() { + long ret = bindings.FixedPenaltyScorer_as_ScoreUpdate(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + ScoreUpdate ret_hu_conv = new ScoreUpdate(null, ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }; return ret_hu_conv; }