[#FeeFrac] = FeeFrac :mrdocs: Data structure storing a fee and size. == Synopsis Declared in `<util/feefrac.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct FeeFrac; ---- == Description The size of a FeeFrac cannot be zero unless the fee is also zero. == Member Functions [cols="1,4"] |=== | Name| Description | xref:FeeFrac/2constructor-05.adoc[`FeeFrac`] [.small]#[constructor]# | Constructors | xref:FeeFrac/operator_assign.adoc[`operator=`] | Copy‐assign the fee and size from another FeeFrac. | xref:FeeFrac/EvaluateFee.adoc[`EvaluateFee`] | Compute the fee for a given size `at_size` using this object's feerate. | xref:FeeFrac/EvaluateFeeDown.adoc[`EvaluateFeeDown`] | Compute the fee for a given size `at_size` using this object's feerate, rounding down. | xref:FeeFrac/EvaluateFeeUp.adoc[`EvaluateFeeUp`] | Compute the fee for a given size `at_size` using this object's feerate, rounding up. | xref:FeeFrac/IsEmpty.adoc[`IsEmpty`] | Check if this is empty (size and fee are 0). | xref:FeeFrac/operator_plus_eq.adoc[`operator+=`] | Add fee and size of another FeeFrac to this one. | xref:FeeFrac/operator_minus_eq.adoc[`operator‐=`] | Subtract fee and size of another FeeFrac from this one. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:FeeFrac/Div.adoc[`Div`] | Helper function for 96/32 signed division, rounding towards negative infinity (if round_down), or towards positive infinity (if !round_down). This is a version relying on __int128. | xref:FeeFrac/DivFallback.adoc[`DivFallback`] | Helper function for 96/32 signed division, rounding towards negative infinity (if round_down) or positive infinity (if !round_down). This is a fallback version, separate so that it can be tested on platforms where it isn't actually needed. | xref:FeeFrac/Mul.adoc[`Mul`] | Helper function for 32*64 signed multiplication, returning an unspecified but totally ordered type. This is a version relying on __int128. | xref:FeeFrac/MulFallback.adoc[`MulFallback`] | Helper function for 32*64 signed multiplication, returning an unspecified but totally ordered type. This is a fallback version, separate so it can be tested on platforms where it isn't actually needed. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:FeeFrac/fee.adoc[`fee`] | The fee, in satoshis. | xref:FeeFrac/size.adoc[`size`] | The size, in the unit chosen by the caller (for example vbytes or weight units). |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:swap-02.adoc[swap]` | Swap two FeeFracs. | `xref:operator_eq-03b.adoc[operator==]` | Check if two FeeFrac objects are equal (both same fee and same size). | `xref:operator_minus-0b.adoc[operator‐]` | Subtract both fee and size. | `xref:operator_plus-0f3.adoc[operator+]` | Sum fee and size. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:cluster_linearize/ChunkLinearization.adoc[`cluster_linearize::ChunkLinearization`] | Compute the feerates of the chunks of linearization. Identical to ChunkLinearizationInfo, but only returns the chunk feerates, not the corresponding transaction sets. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:FeePerUnit.adoc[`FeePerUnit`] | Tagged wrapper around FeeFrac to avoid unit confusion. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#