downstream 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- downstream-0.4.2/LICENSE +21 -0
- downstream-0.4.2/PKG-INFO +106 -0
- downstream-0.4.2/README.md +59 -0
- downstream-0.4.2/downstream/__init__.py +15 -0
- downstream-0.4.2/downstream/downstream/__init__.py +4 -0
- downstream-0.4.2/downstream/genome_instrumentation/_BitSurface.py +2 -0
- downstream-0.4.2/downstream/genome_instrumentation/_StructSurface.py +2 -0
- downstream-0.4.2/downstream/genome_instrumentation/__init__.py +7 -0
- downstream-0.4.2/downstream/interop/__init__.py +23 -0
- downstream-0.4.2/downstream/interop/_make_stratum_retention_policy_from_site_selection_algo.py +278 -0
- downstream-0.4.2/downstream/interop/_stratum_retention_interop_hybrid_algo.py +14 -0
- downstream-0.4.2/downstream/interop/_stratum_retention_interop_steady_algo.py +14 -0
- downstream-0.4.2/downstream/interop/_stratum_retention_interop_tilted_algo.py +14 -0
- downstream-0.4.2/downstream/interop/_stratum_retention_interop_tilted_sticky_algo.py +14 -0
- downstream-0.4.2/downstream/pylib/Literal.py +4 -0
- downstream-0.4.2/downstream/pylib/__init__.py +69 -0
- downstream-0.4.2/downstream/pylib/bit_ceil.py +11 -0
- downstream-0.4.2/downstream/pylib/bit_count_immediate_zeros.py +10 -0
- downstream-0.4.2/downstream/pylib/bit_count_leading_ones.py +18 -0
- downstream-0.4.2/downstream/pylib/bit_decode_gray.py +8 -0
- downstream-0.4.2/downstream/pylib/bit_drop_msb.py +6 -0
- downstream-0.4.2/downstream/pylib/bit_encode_gray.py +7 -0
- downstream-0.4.2/downstream/pylib/bit_floor.py +8 -0
- downstream-0.4.2/downstream/pylib/bit_invert.py +7 -0
- downstream-0.4.2/downstream/pylib/bit_reverse.py +9 -0
- downstream-0.4.2/downstream/pylib/calc_dyadic_lcm_upper_bound.py +25 -0
- downstream-0.4.2/downstream/pylib/count_factors_of_2.py +19 -0
- downstream-0.4.2/downstream/pylib/enforce_typing.py +41 -0
- downstream-0.4.2/downstream/pylib/fast_pow2_divide.py +39 -0
- downstream-0.4.2/downstream/pylib/fast_pow2_mod.py +34 -0
- downstream-0.4.2/downstream/pylib/get_powersof2triangle_val_at_index.py +11 -0
- downstream-0.4.2/downstream/pylib/hanoi/__init__.py +33 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_hanoi_value_at_index.py +10 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_hanoi_value_incidence_at_index.py +11 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_hanoi_value_index_cadence.py +4 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_hanoi_value_index_offset.py +3 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_incidence_count_of_hanoi_value_through_index.py +15 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_index_of_hanoi_value_next_incidence.py +28 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_index_of_hanoi_value_nth_incidence.py +14 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_max_hanoi_value_through_index.py +10 -0
- downstream-0.4.2/downstream/pylib/hanoi/get_min_hanoi_value_with_incidence_at_least.py +26 -0
- downstream-0.4.2/downstream/pylib/jupyter_hide_toggle.py +64 -0
- downstream-0.4.2/downstream/pylib/log_args_and_result.py +54 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_alternating/__init__.py +17 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_alternating/get_longevity_directionality.py +3 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_alternating/get_longevity_index_of_mapped_position.py +44 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_alternating/get_longevity_mapped_position_of_index.py +35 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_alternating/get_longevity_reversed_position_within_level.py +14 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_common/__init__.py +19 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_common/get_longevity_level_of_index.py +3 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_common/get_longevity_level_of_mapped_position.py +12 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_common/get_longevity_num_positions_at_level.py +2 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_common/get_longevity_num_positions_at_lower_levels.py +7 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_common/get_longevity_offset_of_level.py +8 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_descending/__init__.py +11 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_descending/get_longevity_index_of_mapped_position.py +14 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_descending/get_longevity_mapped_position_of_index.py +21 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_naive/__init__.py +15 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_naive/get_longevity_index_of_mapped_position.py +10 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_naive/get_longevity_mapped_position_of_index.py +24 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_naive/get_longevity_position_within_level.py +23 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_piecewise_ascending/__init__.py +11 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_piecewise_ascending/get_longevity_index_of_mapped_position.py +28 -0
- downstream-0.4.2/downstream/pylib/longevity_ordering_piecewise_ascending/get_longevity_mapped_position_of_index.py +22 -0
- downstream-0.4.2/downstream/pylib/modulo.py +35 -0
- downstream-0.4.2/downstream/pylib/oeis/__init__.py +35 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a000295_index_of_value.py +12 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a000295_value_at_index.py +8 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a005187_index_of_value.py +540 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a005187_value_at_index.py +3 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a025480_value_at_index.py +3 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a030109_index_of_value.py +13 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a030109_value_at_index.py +6 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a037870_value_at_index.py +5 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a048881_value_at_index.py +4 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a059893_index_of_value.py +6 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a059893_value_at_index.py +7 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a083058_index_of_value.py +7 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a083058_value_at_index.py +2 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a130654_value_at_index.py +17 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a341916_index_of_value.py +7 -0
- downstream-0.4.2/downstream/pylib/oeis/get_a341916_value_at_index.py +7 -0
- downstream-0.4.2/downstream/pylib/prepend_cmap_with_color.py +15 -0
- downstream-0.4.2/downstream/pylib/round_to_one_sigfig.py +13 -0
- downstream-0.4.2/downstream/pylib/sign.py +23 -0
- downstream-0.4.2/downstream/pylib/site_selection_eval/__init__.py +13 -0
- downstream-0.4.2/downstream/pylib/site_selection_eval/get_first_decreasing_hanoi_value_deposition.py +27 -0
- downstream-0.4.2/downstream/pylib/site_selection_eval/get_first_deposition_over_too_new_site.py +93 -0
- downstream-0.4.2/downstream/pylib/site_selection_eval/get_first_resolved_resident_rank_inconsistency.py +35 -0
- downstream-0.4.2/downstream/pylib/site_selection_eval/make_surface_history_df.py +70 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/_SurfaceHistoryToStratumRetentionPolicyShim.py +38 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/__init__.py +17 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/_apply_pseudo_linear_yticks.py +37 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/_apply_pseudo_log_yticks.py +26 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/_geomspace_filter_surface_history_df.py +22 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/_linspace_filter_surface_history_df.py +22 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/site_deposition_depth_by_rank_heatmap.py +66 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/site_deposition_rank_by_rank_heatmap.py +65 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/site_differentia_by_rank_heatmap.py +54 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/site_hanoi_value_by_rank_heatmap.py +57 -0
- downstream-0.4.2/downstream/pylib/site_selection_viz/stratum_persistence_dripplot.py +23 -0
- downstream-0.4.2/downstream/pylib/tee_release.py +10 -0
- downstream-0.4.2/downstream/pylib/test/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_Literal.py +5 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_ceil.py +52 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_count_immediate_zeros.py +46 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_count_leading_ones.py +22 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_decode_gray.py +7 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_drop_msb.py +27 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_encode_gray.py +27 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_floor.py +14 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_invert.py +33 -0
- downstream-0.4.2/downstream/pylib/test/test_bit_reverse.py +27 -0
- downstream-0.4.2/downstream/pylib/test/test_calc_dyadic_lcm_upper_bound.py +62 -0
- downstream-0.4.2/downstream/pylib/test/test_count_factors_of_2.py +21 -0
- downstream-0.4.2/downstream/pylib/test/test_enforce_typing.py +36 -0
- downstream-0.4.2/downstream/pylib/test/test_fast_pow2_divide.py +72 -0
- downstream-0.4.2/downstream/pylib/test/test_fast_pow2_mod.py +66 -0
- downstream-0.4.2/downstream/pylib/test/test_get_powersof2triangle_val_at_index.py +95 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_hanoi_value_at_index.py +116 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_hanoi_value_incidence_at_index.py +12 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_incidence_count_of_hanoi_value_through_index.py +22 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_index_of_hanoi_value_next_incidence.py +37 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_index_of_hanoi_value_nth_incidence.py +15 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_max_hanoi_value_through_index.py +12 -0
- downstream-0.4.2/downstream/pylib/test/test_hanoi/test_get_min_hanoi_value_with_incidence_at_least.py +32 -0
- downstream-0.4.2/downstream/pylib/test/test_log_args_and_result.py +41 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_alternating/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_alternating/test_get_longevity_index_of_mapped_position.py +31 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_alternating/test_get_longevity_mapped_position_of_index.py +128 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_alternating/test_get_longevity_reversed_position_within_level.py +21 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_common/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_common/test_get_longevity_level_of_index.py +10 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_common/test_get_longevity_level_of_mapped_position.py +76 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_common/test_get_longevity_num_positions_at_level.py +10 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_common/test_get_longevity_offset_of_level.py +23 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_common/test_longevity_num_positions_at_lower_levels.py +7 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_descending/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_descending/test_get_longevity_index_of_mapped_position.py +28 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_descending/test_get_longevity_mapped_position_of_index.py +101 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_naive/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_naive/test_get_longevity_index_of_mapped_position.py +28 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_naive/test_get_longevity_mapped_position_of_index.py +101 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_naive/test_get_longevity_position_within_level.py +51 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_piecewise_ascending/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_piecewise_ascending/test_get_longevity_index_of_mapped_position.py +28 -0
- downstream-0.4.2/downstream/pylib/test/test_longevity_ordering_piecewise_ascending/test_get_longevity_mapped_position_of_index.py +101 -0
- downstream-0.4.2/downstream/pylib/test/test_modulo.py +30 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/__init__.py +0 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a000295_index_of_value.py +35 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a000295_value_at_index.py +41 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a005187_index_of_value.py +9 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a005187_value_at_index.py +73 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a025480_value_at_index.py +91 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a030109_index_of_value.py +13 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a030109_value_at_index.py +90 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a037870_value_at_index.py +97 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a048881_value_at_index.py +112 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a059893_index_of_value.py +13 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a059893_value_at_index.py +78 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a083058_index_of_value.py +10 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a083058_value_at_index.py +81 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a130654_value_at_index.py +139 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a341916_index_of_value.py +13 -0
- downstream-0.4.2/downstream/pylib/test/test_oeis/test_get_a341916_value_at_index.py +74 -0
- downstream-0.4.2/downstream/pylib/test/test_prepend_cmap_with_color.py +14 -0
- downstream-0.4.2/downstream/pylib/test/test_round_to_one_sigfig.py +8 -0
- downstream-0.4.2/downstream/pylib/test/test_sign.py +19 -0
- downstream-0.4.2/downstream/serialization/__init__.py +11 -0
- downstream-0.4.2/downstream/serialization/_col_from_surf_int.py +60 -0
- downstream-0.4.2/downstream/serialization/_col_from_surf_packet.py +89 -0
- downstream-0.4.2/downstream/serialization/_sort_differentiae_by_deposition_rank.py +71 -0
- downstream-0.4.2/downstream/site_selection_strategy/__init__.py +4 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/__init__.py +15 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/hybrid_algo/__init__.py +9 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/hybrid_algo/_calc_resident_deposition_rank.py +32 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/hybrid_algo/_iter_resident_deposition_ranks.py +28 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/hybrid_algo/_pick_deposition_site.py +36 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/__init__.py +37 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_enact/__init__.py +5 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_enact/_pick_deposition_site.py +79 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/__init__.py +33 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_calc_resident_deposition_rank_wrt_bin.py +79 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_bin_number_of_position.py +36 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_bin_offset_at_position.py +7 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_bin_width_at_position.py +65 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_nth_bin_position.py +35 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_nth_bin_width.py +20 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_nth_segment_bin_count.py +5 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_nth_segment_bin_width.py +9 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_nth_segment_position.py +30 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_nth_segment_width.py +8 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_num_bins.py +3 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_num_positions.py +5 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_get_num_segments.py +5 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_impl/_iter_bin_coords.py +26 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_scry/__init__.py +7 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_scry/_calc_resident_deposition_rank.py +37 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/steady_algo/_scry/_iter_resident_deposition_ranks.py +40 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/__init__.py +11 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_enact/__init__.py +0 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_enact/_pick_deposition_site.py +43 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/__init__.py +59 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_calc_hanoi_invasion_rank.py +10 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_calc_invading_hanoi_value.py +17 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_calc_resident_hanoi_value.py +77 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_epoch_rank.py +16 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_global_epoch.py +20 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_global_num_reservations.py +12 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_grip_reservation_index_logical.py +51 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_grip_reservation_index_physical.py +44 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_hanoi_num_reservations.py +44 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_reservation_position_logical.py +19 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_reservation_position_physical.py +26 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_reservation_width_physical.py +19 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_site_genesis_reservation_index_physical.py +33 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_site_hanoi_value_assigned.py +32 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_site_reservation_index_logical.py +39 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_impl/_get_site_reservation_index_physical.py +41 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_scry/__init__.py +7 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_scry/_calc_resident_deposition_rank.py +222 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_algo/_scry/_iter_resident_deposition_ranks.py +31 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/__init__.py +14 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_enact/__init__.py +5 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_enact/_pick_deposition_site.py +59 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/__init__.py +59 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_fractional_downgrade_num_reservations_provided.py +36 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_fractional_downgrade_rank.py +60 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_fractional_downgrade_state.py +295 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_num_incidence_reservations_at_rank.py +23 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_num_reservations_provided.py +39 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_num_sites_reserved_per_incidence_at_rank.py +24 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_regime_mx.py +21 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_regime_num_reservations_available.py +23 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_regime_num_reservations_provided.py +39 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_regime_reservation_downgrade_rank.py +58 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_safe_downgrade_rank.py +152 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_surface_rank_capacity.py +13 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_upcoming_hanoi_invasion_rank.py +20 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_get_upcoming_hanoi_invasion_value.py +30 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_has_hanoi_value_filled_first_reservation_layer.py +32 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_is_2x_reservation_eligible.py +28 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_is_hanoi_invadable_and_uninvaded.py +11 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_is_hanoi_invaded.py +19 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_is_hanoi_invader.py +17 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_impl/_iter_hanoi_invader_values.py +18 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/__init__.py +7 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_calc_resident_deposition_rank.py +41 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/__init__.py +29 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_calc_incidence_of_deposited_hanoi_value.py +68 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_calc_rank_of_deposited_hanoi_value.py +36 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_calc_reservation_reference_incidence.py +101 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_calc_resident_hanoi_context.py +138 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_get_reservation_index_elimination_rank.py +114 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_iter_candidate_hanoi_occupants.py +30 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_iter_candidate_reservation_indices.py +33 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_impl/_iter_candidate_reservation_sizes.py +28 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_hadamard_order_site_rungs_algo/_scry/_iter_resident_deposition_ranks.py +2 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_sticky_algo/__init__.py +9 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_sticky_algo/_calc_resident_deposition_rank.py +42 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_sticky_algo/_iter_resident_deposition_ranks.py +31 -0
- downstream-0.4.2/downstream/site_selection_strategy/site_selection_algorithms/tilted_sticky_algo/_pick_deposition_site.py +32 -0
- downstream-0.4.2/downstream.egg-info/PKG-INFO +106 -0
- downstream-0.4.2/downstream.egg-info/SOURCES.txt +433 -0
- downstream-0.4.2/downstream.egg-info/dependency_links.txt +1 -0
- downstream-0.4.2/downstream.egg-info/requires.txt +28 -0
- downstream-0.4.2/downstream.egg-info/top_level.txt +3 -0
- downstream-0.4.2/pylib/hanoi/__init__.py +33 -0
- downstream-0.4.2/pylib/hanoi/get_hanoi_value_at_index.py +10 -0
- downstream-0.4.2/pylib/hanoi/get_hanoi_value_incidence_at_index.py +11 -0
- downstream-0.4.2/pylib/hanoi/get_hanoi_value_index_cadence.py +4 -0
- downstream-0.4.2/pylib/hanoi/get_hanoi_value_index_offset.py +3 -0
- downstream-0.4.2/pylib/hanoi/get_incidence_count_of_hanoi_value_through_index.py +15 -0
- downstream-0.4.2/pylib/hanoi/get_index_of_hanoi_value_next_incidence.py +28 -0
- downstream-0.4.2/pylib/hanoi/get_index_of_hanoi_value_nth_incidence.py +14 -0
- downstream-0.4.2/pylib/hanoi/get_max_hanoi_value_through_index.py +10 -0
- downstream-0.4.2/pylib/hanoi/get_min_hanoi_value_with_incidence_at_least.py +26 -0
- downstream-0.4.2/pylib/longevity_ordering_alternating/__init__.py +17 -0
- downstream-0.4.2/pylib/longevity_ordering_alternating/get_longevity_directionality.py +3 -0
- downstream-0.4.2/pylib/longevity_ordering_alternating/get_longevity_index_of_mapped_position.py +44 -0
- downstream-0.4.2/pylib/longevity_ordering_alternating/get_longevity_mapped_position_of_index.py +35 -0
- downstream-0.4.2/pylib/longevity_ordering_alternating/get_longevity_reversed_position_within_level.py +14 -0
- downstream-0.4.2/pylib/longevity_ordering_common/__init__.py +19 -0
- downstream-0.4.2/pylib/longevity_ordering_common/get_longevity_level_of_index.py +3 -0
- downstream-0.4.2/pylib/longevity_ordering_common/get_longevity_level_of_mapped_position.py +12 -0
- downstream-0.4.2/pylib/longevity_ordering_common/get_longevity_num_positions_at_level.py +2 -0
- downstream-0.4.2/pylib/longevity_ordering_common/get_longevity_num_positions_at_lower_levels.py +7 -0
- downstream-0.4.2/pylib/longevity_ordering_common/get_longevity_offset_of_level.py +8 -0
- downstream-0.4.2/pylib/longevity_ordering_descending/__init__.py +11 -0
- downstream-0.4.2/pylib/longevity_ordering_descending/get_longevity_index_of_mapped_position.py +14 -0
- downstream-0.4.2/pylib/longevity_ordering_descending/get_longevity_mapped_position_of_index.py +21 -0
- downstream-0.4.2/pylib/longevity_ordering_naive/__init__.py +15 -0
- downstream-0.4.2/pylib/longevity_ordering_naive/get_longevity_index_of_mapped_position.py +10 -0
- downstream-0.4.2/pylib/longevity_ordering_naive/get_longevity_mapped_position_of_index.py +24 -0
- downstream-0.4.2/pylib/longevity_ordering_naive/get_longevity_position_within_level.py +23 -0
- downstream-0.4.2/pylib/longevity_ordering_piecewise_ascending/__init__.py +11 -0
- downstream-0.4.2/pylib/longevity_ordering_piecewise_ascending/get_longevity_index_of_mapped_position.py +28 -0
- downstream-0.4.2/pylib/longevity_ordering_piecewise_ascending/get_longevity_mapped_position_of_index.py +22 -0
- downstream-0.4.2/pylib/oeis/__init__.py +35 -0
- downstream-0.4.2/pylib/oeis/get_a000295_index_of_value.py +12 -0
- downstream-0.4.2/pylib/oeis/get_a000295_value_at_index.py +8 -0
- downstream-0.4.2/pylib/oeis/get_a005187_index_of_value.py +540 -0
- downstream-0.4.2/pylib/oeis/get_a005187_value_at_index.py +3 -0
- downstream-0.4.2/pylib/oeis/get_a025480_value_at_index.py +3 -0
- downstream-0.4.2/pylib/oeis/get_a030109_index_of_value.py +13 -0
- downstream-0.4.2/pylib/oeis/get_a030109_value_at_index.py +6 -0
- downstream-0.4.2/pylib/oeis/get_a037870_value_at_index.py +5 -0
- downstream-0.4.2/pylib/oeis/get_a048881_value_at_index.py +4 -0
- downstream-0.4.2/pylib/oeis/get_a059893_index_of_value.py +6 -0
- downstream-0.4.2/pylib/oeis/get_a059893_value_at_index.py +7 -0
- downstream-0.4.2/pylib/oeis/get_a083058_index_of_value.py +7 -0
- downstream-0.4.2/pylib/oeis/get_a083058_value_at_index.py +2 -0
- downstream-0.4.2/pylib/oeis/get_a130654_value_at_index.py +17 -0
- downstream-0.4.2/pylib/oeis/get_a341916_index_of_value.py +7 -0
- downstream-0.4.2/pylib/oeis/get_a341916_value_at_index.py +7 -0
- downstream-0.4.2/pylib/site_selection_eval/__init__.py +13 -0
- downstream-0.4.2/pylib/site_selection_eval/get_first_decreasing_hanoi_value_deposition.py +27 -0
- downstream-0.4.2/pylib/site_selection_eval/get_first_deposition_over_too_new_site.py +93 -0
- downstream-0.4.2/pylib/site_selection_eval/get_first_resolved_resident_rank_inconsistency.py +35 -0
- downstream-0.4.2/pylib/site_selection_eval/make_surface_history_df.py +70 -0
- downstream-0.4.2/pylib/site_selection_viz/_SurfaceHistoryToStratumRetentionPolicyShim.py +38 -0
- downstream-0.4.2/pylib/site_selection_viz/__init__.py +17 -0
- downstream-0.4.2/pylib/site_selection_viz/_apply_pseudo_linear_yticks.py +37 -0
- downstream-0.4.2/pylib/site_selection_viz/_apply_pseudo_log_yticks.py +26 -0
- downstream-0.4.2/pylib/site_selection_viz/_geomspace_filter_surface_history_df.py +22 -0
- downstream-0.4.2/pylib/site_selection_viz/_linspace_filter_surface_history_df.py +22 -0
- downstream-0.4.2/pylib/site_selection_viz/site_deposition_depth_by_rank_heatmap.py +66 -0
- downstream-0.4.2/pylib/site_selection_viz/site_deposition_rank_by_rank_heatmap.py +65 -0
- downstream-0.4.2/pylib/site_selection_viz/site_differentia_by_rank_heatmap.py +54 -0
- downstream-0.4.2/pylib/site_selection_viz/site_hanoi_value_by_rank_heatmap.py +57 -0
- downstream-0.4.2/pylib/site_selection_viz/stratum_persistence_dripplot.py +23 -0
- downstream-0.4.2/pyproject.toml +93 -0
- downstream-0.4.2/setup.cfg +23 -0
- downstream-0.4.2/setup.py +10 -0
- downstream-0.4.2/test_downstream/test_interop/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_interop/test_make_stratum_retention_policy_from_site_selection_algo.py +244 -0
- downstream-0.4.2/test_downstream/test_serialization/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_serialization/test_col_from_surf_int.py +113 -0
- downstream-0.4.2/test_downstream/test_serialization/test_col_from_surf_packet.py +98 -0
- downstream-0.4.2/test_downstream/test_serialization/test_sort_differentiae_by_deposition_rank.py +111 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_hybrid_algo/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_hybrid_algo/test_calc_resident_deposition_rank.py +62 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_hybrid_algo/test_iter_resident_deposition_ranks.py +28 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_enact/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_enact/test_pick_deposition_site.py +60 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_bin_number_of_position.py +16 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_bin_width_at_position.py +101 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_nth_bin_position.py +26 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_nth_bin_width.py +48 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_nth_segment_bin_count.py +12 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_nth_segment_bin_width.py +21 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_nth_segment_position.py +40 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_nth_segment_width.py +21 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_num_bins.py +32 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_get_num_segments.py +22 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_impl/test_iter_bin_coords.py +23 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_scry/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_scry/test_calc_resident_deposition_rank.py +60 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_steady_algo/test_scry/test_iter_resident_deposition_ranks.py +25 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_enact/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_enact/test_pick_deposition_site.py +247 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_calc_hanoi_invasion_rank.py +26 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_calc_invading_hanoi_value.py +25 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_calc_resident_hanoi_value.py +67 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_epoch_rank.py +34 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_global_epoch.py +86 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_global_num_reservtions.py +98 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_global_num_reservtions_at_epoch.py +114 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_grip_reservation_index_logical.py +95 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_grip_reservation_index_logical_at_epoch.py +79 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_grip_reservation_index_physical.py +94 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_grip_reservation_index_physical_at_epoch.py +79 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_hanoi_num_reservtions.py +77 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_reservation_position_logical.py +66 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_reservation_position_physical.py +67 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_reservation_width_physical.py +59 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_site_genesis_reservation_index_physical.py +26 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_site_hanoi_value_assigned.py +62 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_site_reservation_index_logical.py +73 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_site_reservation_index_logical_at_epoch.py +64 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_site_reservation_index_physical.py +73 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_impl/test_get_site_reservation_index_physical_at_epoch.py +64 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_scry/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_scry/test_calc_resident_deposition_rank.py +78 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_algo/test_scry/test_iter_resident_deposition_ranks.py +25 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/__init__.py +1 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_fractional_downgrade_num_reservations_provided.py +23 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_fractional_downgrade_rank.py +23 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_fractional_downgrade_state.py +20 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_num_incidence_reservations_at_rank.py +31 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_num_reservations_provided.py +18 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_num_sites_reserved_per_incidence_at_rank.py +29 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_regime_mx.py +45 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_regime_num_reservations_available.py +26 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_regime_num_reservations_provided.py +18 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_regime_reservation_downgrade_rank.py +18 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_safe_downgrade_rank.py +46 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_surface_rank_capacity.py +32 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_upcoming_hanoi_invasion_rank.py +171 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_get_upcoming_hanoi_invasion_value.py +266 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_has_hanoi_value_filled_first_reservation_layer.py +48 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_is_2x_reservation_eligible.py +44 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_is_hanoi_invadable_and_uninvaded.py +34 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_is_hanoi_invaded.py +35 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_is_hanoi_invader.py +21 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_impl/test_iter_hanoi_invader_values.py +18 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_pick_deposition_site.py +55 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_calc_resident_deposition_rank.py +266 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/_impl/__init__.py +9 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/_impl/_make_num_reservations_provided_df.py +46 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/_impl/_make_reference_incidence_df.py +107 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_calc_incidence_of_deposited_hanoi_value.py +43 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_calc_rank_of_deposited_hanoi_value.py +41 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_calc_reservation_reference_incidence.py +43 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_calc_resident_hanoi_context.py +335 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_get_reservation_index_elimination_rank.py +86 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_iter_candidate_hanoi_occupants.py +51 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_iter_candidate_reservation_indices.py +25 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_impl/test_iter_candidate_reservation_sizes.py +16 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_hadamard_order_site_rungs_algo/test_scry/test_iter_resident_deposition_ranks.py +6 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_sticky_algo/__init__.py +0 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_sticky_algo/test_calc_resident_deposition_rank.py +72 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_sticky_algo/test_iter_resident_deposition_ranks.py +28 -0
- downstream-0.4.2/test_downstream/test_site_selection_strategy/test_site_selection_algorithms/test_tilted_sticky_algo/test_pick_deposition_site.py +24 -0
downstream-0.4.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Matthew Andres Moreno
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: downstream
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: downstream provides efficient, constant-space instrumentation for heredity stratigraphic phylogenetic inference over distributed digital evolution populations.
|
|
5
|
+
Author-email: Matthew Andres Moreno <m.more500@gmail.com>
|
|
6
|
+
License: MIT license
|
|
7
|
+
Project-URL: homepage, https://github.com/mmore500/downstream.git
|
|
8
|
+
Project-URL: repository, https://github.com/mmore500/downstream
|
|
9
|
+
Keywords: downstream
|
|
10
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Natural Language :: English
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: Deprecated
|
|
22
|
+
Requires-Dist: hstrat>=1.7.4
|
|
23
|
+
Requires-Dist: interval_search>=0.5.2
|
|
24
|
+
Requires-Dist: IPython
|
|
25
|
+
Requires-Dist: matplotlib
|
|
26
|
+
Requires-Dist: more_itertools
|
|
27
|
+
Requires-Dist: numpy
|
|
28
|
+
Requires-Dist: opytional
|
|
29
|
+
Requires-Dist: pandas
|
|
30
|
+
Requires-Dist: scipy
|
|
31
|
+
Requires-Dist: seaborn
|
|
32
|
+
Requires-Dist: teeplot>=0.5.0
|
|
33
|
+
Provides-Extra: testing
|
|
34
|
+
Requires-Dist: black==22.10.0; extra == "testing"
|
|
35
|
+
Requires-Dist: isort==5.12.0; extra == "testing"
|
|
36
|
+
Requires-Dist: pytest==7.2.2; extra == "testing"
|
|
37
|
+
Requires-Dist: pytest-xdist==3.2.1; extra == "testing"
|
|
38
|
+
Requires-Dist: ruff==0.0.260; extra == "testing"
|
|
39
|
+
Requires-Dist: tqdm==4.64.1; extra == "testing"
|
|
40
|
+
Provides-Extra: release
|
|
41
|
+
Requires-Dist: bumpver==2022.1120; extra == "release"
|
|
42
|
+
Requires-Dist: twine==1.14.0; extra == "release"
|
|
43
|
+
Requires-Dist: wheel==0.33.6; extra == "release"
|
|
44
|
+
Requires-Dist: pip==22.0.4; extra == "release"
|
|
45
|
+
Requires-Dist: pip_tools==6.10.0; extra == "release"
|
|
46
|
+
Requires-Dist: setuptools==65.6.3; extra == "release"
|
|
47
|
+
|
|
48
|
+
# Downstream
|
|
49
|
+
|
|
50
|
+
[](https://github.com/mmore500/downstream/actions/workflows/ci.yaml)
|
|
51
|
+
[](https://github.com/mmore500/downstream)
|
|
52
|
+
<!-- [
|
|
53
|
+

|
|
54
|
+
](https://pypi.python.org/pypi/downstream) -->
|
|
55
|
+
<!-- [](https://zenodo.org/doi/10.5281/zenodo.10779240) -->
|
|
56
|
+
<!-- [](https://downstream.readthedocs.io/en/latest/?badge=latest) -->
|
|
57
|
+
<!-- [](https://downstream.readthedocs.io/en/latest/) -->
|
|
58
|
+
<!-- [](https://codecov.io/gh/mmore500/downstream) -->
|
|
59
|
+
<!-- [](https://github.com/mmore500/downstream/search?q=todo+OR+fixme&type=) -->
|
|
60
|
+
|
|
61
|
+
downstream provides efficient, constant-space implementations of stream curation algorithms.
|
|
62
|
+
|
|
63
|
+
- Free software: MIT license
|
|
64
|
+
|
|
65
|
+
<!---
|
|
66
|
+
- Documentation: <https://downstream.readthedocs.io>.
|
|
67
|
+
-->
|
|
68
|
+
|
|
69
|
+
## Installation
|
|
70
|
+
|
|
71
|
+
`python3 -m pip install "git+https://github.com/mmore500/downstream.git@v0.4.2#egg=downstream"`
|
|
72
|
+
|
|
73
|
+
## Documentation
|
|
74
|
+
|
|
75
|
+
Slide deck & graphics for this project are at <https://hopth.ru/ce>.
|
|
76
|
+
|
|
77
|
+
See `https://github.com/mmore500/hstrat-surface-concept` for usage examples.
|
|
78
|
+
|
|
79
|
+
## Citing
|
|
80
|
+
|
|
81
|
+
If downstream contributes to a scientific publication, please cite it as
|
|
82
|
+
|
|
83
|
+
> Matthew Andres Moreno. (2024). mmore500/downstream. Zenodo. https://zenodo.org/doi/TODO
|
|
84
|
+
|
|
85
|
+
```bibtex
|
|
86
|
+
@software{moreno2024downstream,
|
|
87
|
+
author = {Matthew Andres Moreno},
|
|
88
|
+
title = {mmore500/downstream},
|
|
89
|
+
month = mar,
|
|
90
|
+
year = 2024,
|
|
91
|
+
publisher = {Zenodo},
|
|
92
|
+
doi = {TODO},
|
|
93
|
+
url = {https://zenodo.org/doi/TODO}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Consider also citing [hstrat](https://hstrat.readthedocs.io/en/stable/citing.html).
|
|
98
|
+
And don't forget to leave a [star on GitHub](https://github.com/mmore500/downstream/stargazers)!
|
|
99
|
+
|
|
100
|
+
## Credits
|
|
101
|
+
|
|
102
|
+
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [mmore500/cookiecutter-dishtiny-project](https://github.com/mmore500/cookiecutter-dishtiny-project) project template.
|
|
103
|
+
|
|
104
|
+
<!---
|
|
105
|
+
This package uses [Empirical](https://github.com/devosoft/Empirical#readme), a library of tools for scientific software development, with emphasis on also being able to build web interfaces using Emscripten.
|
|
106
|
+
-->
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Downstream
|
|
2
|
+
|
|
3
|
+
[](https://github.com/mmore500/downstream/actions/workflows/ci.yaml)
|
|
4
|
+
[](https://github.com/mmore500/downstream)
|
|
5
|
+
<!-- [
|
|
6
|
+

|
|
7
|
+
](https://pypi.python.org/pypi/downstream) -->
|
|
8
|
+
<!-- [](https://zenodo.org/doi/10.5281/zenodo.10779240) -->
|
|
9
|
+
<!-- [](https://downstream.readthedocs.io/en/latest/?badge=latest) -->
|
|
10
|
+
<!-- [](https://downstream.readthedocs.io/en/latest/) -->
|
|
11
|
+
<!-- [](https://codecov.io/gh/mmore500/downstream) -->
|
|
12
|
+
<!-- [](https://github.com/mmore500/downstream/search?q=todo+OR+fixme&type=) -->
|
|
13
|
+
|
|
14
|
+
downstream provides efficient, constant-space implementations of stream curation algorithms.
|
|
15
|
+
|
|
16
|
+
- Free software: MIT license
|
|
17
|
+
|
|
18
|
+
<!---
|
|
19
|
+
- Documentation: <https://downstream.readthedocs.io>.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
`python3 -m pip install "git+https://github.com/mmore500/downstream.git@v0.4.2#egg=downstream"`
|
|
25
|
+
|
|
26
|
+
## Documentation
|
|
27
|
+
|
|
28
|
+
Slide deck & graphics for this project are at <https://hopth.ru/ce>.
|
|
29
|
+
|
|
30
|
+
See `https://github.com/mmore500/hstrat-surface-concept` for usage examples.
|
|
31
|
+
|
|
32
|
+
## Citing
|
|
33
|
+
|
|
34
|
+
If downstream contributes to a scientific publication, please cite it as
|
|
35
|
+
|
|
36
|
+
> Matthew Andres Moreno. (2024). mmore500/downstream. Zenodo. https://zenodo.org/doi/TODO
|
|
37
|
+
|
|
38
|
+
```bibtex
|
|
39
|
+
@software{moreno2024downstream,
|
|
40
|
+
author = {Matthew Andres Moreno},
|
|
41
|
+
title = {mmore500/downstream},
|
|
42
|
+
month = mar,
|
|
43
|
+
year = 2024,
|
|
44
|
+
publisher = {Zenodo},
|
|
45
|
+
doi = {TODO},
|
|
46
|
+
url = {https://zenodo.org/doi/TODO}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Consider also citing [hstrat](https://hstrat.readthedocs.io/en/stable/citing.html).
|
|
51
|
+
And don't forget to leave a [star on GitHub](https://github.com/mmore500/downstream/stargazers)!
|
|
52
|
+
|
|
53
|
+
## Credits
|
|
54
|
+
|
|
55
|
+
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [mmore500/cookiecutter-dishtiny-project](https://github.com/mmore500/cookiecutter-dishtiny-project) project template.
|
|
56
|
+
|
|
57
|
+
<!---
|
|
58
|
+
This package uses [Empirical](https://github.com/devosoft/Empirical#readme), a library of tools for scientific software development, with emphasis on also being able to build web interfaces using Emscripten.
|
|
59
|
+
-->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Top-level package for downstream."""
|
|
2
|
+
|
|
3
|
+
__author__ = "Matthew Andres Moreno"
|
|
4
|
+
__email__ = "m.more500@gmail.com"
|
|
5
|
+
__version__ = "0.4.2"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
from . import genome_instrumentation, interop, site_selection_strategy
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"interop",
|
|
12
|
+
"genome_instrumentation",
|
|
13
|
+
"serialization",
|
|
14
|
+
"site_selection_strategy",
|
|
15
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from . import (
|
|
2
|
+
_stratum_retention_interop_hybrid_algo as stratum_retention_interop_hybrid_algo,
|
|
3
|
+
)
|
|
4
|
+
from . import (
|
|
5
|
+
_stratum_retention_interop_steady_algo as stratum_retention_interop_steady_algo,
|
|
6
|
+
)
|
|
7
|
+
from . import (
|
|
8
|
+
_stratum_retention_interop_tilted_algo as stratum_retention_interop_tilted_algo,
|
|
9
|
+
)
|
|
10
|
+
from . import (
|
|
11
|
+
_stratum_retention_interop_tilted_sticky_algo as stratum_retention_interop_tilted_sticky_algo,
|
|
12
|
+
)
|
|
13
|
+
from ._make_stratum_retention_policy_from_site_selection_algo import (
|
|
14
|
+
make_stratum_retention_policy_from_site_selection_algo,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"make_stratum_retention_policy_from_site_selection_algo",
|
|
19
|
+
"stratum_retention_interop_hybrid_algo",
|
|
20
|
+
"stratum_retention_interop_steady_algo",
|
|
21
|
+
"stratum_retention_interop_tilted_algo",
|
|
22
|
+
"stratum_retention_interop_tilted_sticky_algo",
|
|
23
|
+
]
|
downstream-0.4.2/downstream/interop/_make_stratum_retention_policy_from_site_selection_algo.py
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import numbers
|
|
2
|
+
import types
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from hstrat.stratum_retention_strategy.stratum_retention_algorithms._detail import (
|
|
6
|
+
PolicyCouplerBase,
|
|
7
|
+
PolicyCouplerFactory,
|
|
8
|
+
PolicySpecBase,
|
|
9
|
+
)
|
|
10
|
+
import more_itertools as mit
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class _PolicySpecBase:
|
|
14
|
+
pass
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class _GenDropRanksFtorBase:
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _CalcNumStrataRetainedExactFtorBase:
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class _CalcRankAtColumnIndexFtorBase:
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class _IterRetainedRanksFtorBase:
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class _CalcNumStrataRetainedUpperBoundFtorBase:
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def make_stratum_retention_policy_from_site_selection_algo(
|
|
38
|
+
site_selection_algo: types.ModuleType,
|
|
39
|
+
) -> PolicyCouplerBase:
|
|
40
|
+
"""Create object infrastructure for a stratum retention policy equivalent
|
|
41
|
+
to provided surface site selection algorithm."""
|
|
42
|
+
|
|
43
|
+
class PolicySpec(PolicySpecBase, _PolicySpecBase):
|
|
44
|
+
"""Contains all policy parameters, if any."""
|
|
45
|
+
|
|
46
|
+
_site_selection_algo: types.ModuleType = site_selection_algo
|
|
47
|
+
_surface_size: int
|
|
48
|
+
|
|
49
|
+
def __init__(
|
|
50
|
+
self: "PolicySpec",
|
|
51
|
+
surface_size: int,
|
|
52
|
+
):
|
|
53
|
+
"""Construct the policy spec.
|
|
54
|
+
|
|
55
|
+
Parameters
|
|
56
|
+
----------
|
|
57
|
+
surface_size : int
|
|
58
|
+
How many sites does surface contain?
|
|
59
|
+
"""
|
|
60
|
+
assert surface_size > 1
|
|
61
|
+
self._surface_size = surface_size
|
|
62
|
+
|
|
63
|
+
def __eq__(self: "PolicySpec", other: typing.Any) -> bool:
|
|
64
|
+
return isinstance(other, _PolicySpecBase) and (
|
|
65
|
+
self._surface_size,
|
|
66
|
+
self._site_selection_algo,
|
|
67
|
+
) == (
|
|
68
|
+
other._surface_size,
|
|
69
|
+
other._site_selection_algo,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def __repr__(self: "PolicySpec") -> str:
|
|
73
|
+
return f"""{
|
|
74
|
+
self.GetAlgoIdentifier()
|
|
75
|
+
}.{
|
|
76
|
+
PolicySpec.__qualname__
|
|
77
|
+
}(surface_size={
|
|
78
|
+
self._surface_size
|
|
79
|
+
})"""
|
|
80
|
+
|
|
81
|
+
def __str__(self: "PolicySpec") -> str:
|
|
82
|
+
return f"""{
|
|
83
|
+
self.GetAlgoTitle()
|
|
84
|
+
} (surface size: {
|
|
85
|
+
self._surface_size
|
|
86
|
+
})"""
|
|
87
|
+
|
|
88
|
+
def GetEvalCtor(self: "PolicySpec") -> str:
|
|
89
|
+
return (
|
|
90
|
+
"downstream.interop.stratum_retention_interop_"
|
|
91
|
+
f"{site_selection_algo.__name__}.{self!r}"
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
def GetSurfaceSize(self: "PolicySpec") -> int:
|
|
95
|
+
return self._surface_size
|
|
96
|
+
|
|
97
|
+
@staticmethod
|
|
98
|
+
def GetAlgoIdentifier() -> str:
|
|
99
|
+
"""Get programatic name for underlying retention algorithm."""
|
|
100
|
+
return site_selection_algo.__name__
|
|
101
|
+
|
|
102
|
+
@staticmethod
|
|
103
|
+
def GetAlgoTitle() -> str:
|
|
104
|
+
"""Get human-readable name for underlying retention algorithm."""
|
|
105
|
+
return site_selection_algo.__name__.replace("_", " ")
|
|
106
|
+
|
|
107
|
+
class CalcNumStrataRetainedExactFtor(_CalcNumStrataRetainedExactFtorBase):
|
|
108
|
+
def __init__(
|
|
109
|
+
self: "CalcNumStrataRetainedExactFtor",
|
|
110
|
+
policy_spec: typing.Optional[PolicySpec],
|
|
111
|
+
) -> None:
|
|
112
|
+
pass
|
|
113
|
+
|
|
114
|
+
def __eq__(
|
|
115
|
+
self: "CalcNumStrataRetainedExactFtor",
|
|
116
|
+
other: typing.Any,
|
|
117
|
+
) -> bool:
|
|
118
|
+
return isinstance(other, _CalcNumStrataRetainedExactFtorBase)
|
|
119
|
+
|
|
120
|
+
def __call__(
|
|
121
|
+
self: "CalcNumStrataRetainedExactFtor",
|
|
122
|
+
policy: PolicyCouplerBase,
|
|
123
|
+
num_strata_deposited: int,
|
|
124
|
+
) -> int:
|
|
125
|
+
return sum(
|
|
126
|
+
1 for __ in policy.IterRetainedRanks(num_strata_deposited)
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
class CalcRankAtColumnIndexFtor(_CalcRankAtColumnIndexFtorBase):
|
|
130
|
+
def __init__(
|
|
131
|
+
self: "CalcRankAtColumnIndexFtor",
|
|
132
|
+
policy_spec: typing.Optional[PolicySpec],
|
|
133
|
+
) -> None:
|
|
134
|
+
pass
|
|
135
|
+
|
|
136
|
+
def __eq__(
|
|
137
|
+
self: "CalcRankAtColumnIndexFtor",
|
|
138
|
+
other: typing.Any,
|
|
139
|
+
) -> bool:
|
|
140
|
+
return isinstance(other, _CalcRankAtColumnIndexFtorBase)
|
|
141
|
+
|
|
142
|
+
def __call__(
|
|
143
|
+
self: "CalcRankAtColumnIndexFtor",
|
|
144
|
+
policy: PolicyCouplerBase,
|
|
145
|
+
index: int,
|
|
146
|
+
num_strata_deposited: int,
|
|
147
|
+
) -> int:
|
|
148
|
+
if (
|
|
149
|
+
not 0
|
|
150
|
+
<= index
|
|
151
|
+
< policy.CalcNumStrataRetainedExact(num_strata_deposited)
|
|
152
|
+
):
|
|
153
|
+
raise IndexError
|
|
154
|
+
res = mit.nth(
|
|
155
|
+
policy.IterRetainedRanks(num_strata_deposited), index
|
|
156
|
+
)
|
|
157
|
+
assert res is not None
|
|
158
|
+
return res
|
|
159
|
+
|
|
160
|
+
class GenDropRanksFtor(_GenDropRanksFtorBase):
|
|
161
|
+
def __init__(
|
|
162
|
+
self: "GenDropRanksFtor",
|
|
163
|
+
policy_spec: typing.Optional[PolicySpec],
|
|
164
|
+
) -> None:
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
def __eq__(
|
|
168
|
+
self: "GenDropRanksFtor",
|
|
169
|
+
other: typing.Any,
|
|
170
|
+
) -> bool:
|
|
171
|
+
return isinstance(other, _GenDropRanksFtorBase)
|
|
172
|
+
|
|
173
|
+
def __call__(
|
|
174
|
+
self: "GenDropRanksFtor",
|
|
175
|
+
policy: PolicyCouplerBase,
|
|
176
|
+
num_stratum_depositions_completed: int,
|
|
177
|
+
retained_ranks: typing.Optional[typing.Iterable[int]] = None,
|
|
178
|
+
) -> typing.Iterator[int]:
|
|
179
|
+
# convert for compat with numpy dtypes
|
|
180
|
+
assert isinstance(
|
|
181
|
+
num_stratum_depositions_completed, numbers.Integral
|
|
182
|
+
)
|
|
183
|
+
num_stratum_depositions_completed = int(
|
|
184
|
+
num_stratum_depositions_completed,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
if num_stratum_depositions_completed == 0:
|
|
188
|
+
return
|
|
189
|
+
|
|
190
|
+
algo = site_selection_algo
|
|
191
|
+
surface_size = policy.GetSpec().GetSurfaceSize()
|
|
192
|
+
|
|
193
|
+
target_site = algo.pick_deposition_site(
|
|
194
|
+
num_stratum_depositions_completed, surface_size
|
|
195
|
+
)
|
|
196
|
+
target_rank = algo.calc_resident_deposition_rank(
|
|
197
|
+
target_site, surface_size, num_stratum_depositions_completed
|
|
198
|
+
)
|
|
199
|
+
if target_rank != 0:
|
|
200
|
+
yield target_rank
|
|
201
|
+
return
|
|
202
|
+
elif 0 not in algo.iter_resident_deposition_ranks(
|
|
203
|
+
surface_size,
|
|
204
|
+
num_stratum_depositions_completed + 1,
|
|
205
|
+
):
|
|
206
|
+
yield 0
|
|
207
|
+
return
|
|
208
|
+
|
|
209
|
+
class IterRetainedRanksFtor(_IterRetainedRanksFtorBase):
|
|
210
|
+
def __init__(
|
|
211
|
+
self: "IterRetainedRanksFtor",
|
|
212
|
+
policy_spec: typing.Optional[PolicySpec],
|
|
213
|
+
) -> None:
|
|
214
|
+
pass
|
|
215
|
+
|
|
216
|
+
def __eq__(
|
|
217
|
+
self: "IterRetainedRanksFtor",
|
|
218
|
+
other: typing.Any,
|
|
219
|
+
) -> bool:
|
|
220
|
+
return isinstance(other, _IterRetainedRanksFtorBase)
|
|
221
|
+
|
|
222
|
+
def __call__(
|
|
223
|
+
self: "IterRetainedRanksFtor",
|
|
224
|
+
policy: PolicyCouplerBase,
|
|
225
|
+
num_strata_deposited: int,
|
|
226
|
+
) -> typing.Iterator[int]:
|
|
227
|
+
# convert for compat with numpy dtypes
|
|
228
|
+
assert isinstance(num_strata_deposited, numbers.Integral)
|
|
229
|
+
num_strata_deposited = int(num_strata_deposited)
|
|
230
|
+
|
|
231
|
+
if num_strata_deposited == 0:
|
|
232
|
+
return
|
|
233
|
+
algo = site_selection_algo
|
|
234
|
+
surface_size = policy.GetSpec().GetSurfaceSize()
|
|
235
|
+
ranks = sorted(
|
|
236
|
+
algo.iter_resident_deposition_ranks(
|
|
237
|
+
surface_size,
|
|
238
|
+
num_strata_deposited,
|
|
239
|
+
)
|
|
240
|
+
)
|
|
241
|
+
last_zero = ranks.count(0) - (ranks[0] == 0)
|
|
242
|
+
assert 0 <= last_zero < len(ranks)
|
|
243
|
+
yield from ranks[last_zero:]
|
|
244
|
+
|
|
245
|
+
class CalcNumStrataRetainedUpperBoundFtor(
|
|
246
|
+
_CalcNumStrataRetainedUpperBoundFtorBase,
|
|
247
|
+
):
|
|
248
|
+
def __init__(
|
|
249
|
+
self: "CalcNumStrataRetainedUpperBoundFtor",
|
|
250
|
+
policy_spec: typing.Optional[PolicySpec],
|
|
251
|
+
) -> None:
|
|
252
|
+
pass
|
|
253
|
+
|
|
254
|
+
def __eq__(
|
|
255
|
+
self: "CalcNumStrataRetainedUpperBoundFtor",
|
|
256
|
+
other: typing.Any,
|
|
257
|
+
) -> bool:
|
|
258
|
+
return isinstance(other, _CalcNumStrataRetainedUpperBoundFtorBase)
|
|
259
|
+
|
|
260
|
+
def __call__(
|
|
261
|
+
self: "CalcNumStrataRetainedUpperBoundFtor",
|
|
262
|
+
policy: PolicyCouplerBase,
|
|
263
|
+
num_strata_deposited: int,
|
|
264
|
+
) -> typing.Iterator[int]:
|
|
265
|
+
surface_size = policy.GetSpec().GetSurfaceSize()
|
|
266
|
+
return min(
|
|
267
|
+
num_strata_deposited,
|
|
268
|
+
surface_size,
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
return PolicyCouplerFactory(
|
|
272
|
+
policy_spec_t=PolicySpec,
|
|
273
|
+
gen_drop_ranks_ftor_t=GenDropRanksFtor,
|
|
274
|
+
calc_num_strata_retained_exact_ftor_t=CalcNumStrataRetainedExactFtor,
|
|
275
|
+
calc_rank_at_column_index_ftor_t=CalcRankAtColumnIndexFtor,
|
|
276
|
+
iter_retained_ranks_ftor_t=IterRetainedRanksFtor,
|
|
277
|
+
calc_num_strata_retained_upper_bound_ftor_t=CalcNumStrataRetainedUpperBoundFtor,
|
|
278
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from ..site_selection_strategy.site_selection_algorithms import (
|
|
2
|
+
hybrid_algo as _site_selection_algo,
|
|
3
|
+
)
|
|
4
|
+
from ._make_stratum_retention_policy_from_site_selection_algo import (
|
|
5
|
+
make_stratum_retention_policy_from_site_selection_algo,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
Policy = make_stratum_retention_policy_from_site_selection_algo(
|
|
9
|
+
_site_selection_algo
|
|
10
|
+
)
|
|
11
|
+
PolicySpec = Policy.policy_spec_t
|
|
12
|
+
|
|
13
|
+
# prevent name leakage
|
|
14
|
+
del make_stratum_retention_policy_from_site_selection_algo
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from ..site_selection_strategy.site_selection_algorithms import (
|
|
2
|
+
steady_algo as _site_selection_algo,
|
|
3
|
+
)
|
|
4
|
+
from ._make_stratum_retention_policy_from_site_selection_algo import (
|
|
5
|
+
make_stratum_retention_policy_from_site_selection_algo,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
Policy = make_stratum_retention_policy_from_site_selection_algo(
|
|
9
|
+
_site_selection_algo
|
|
10
|
+
)
|
|
11
|
+
PolicySpec = Policy.policy_spec_t
|
|
12
|
+
|
|
13
|
+
# prevent name leakage
|
|
14
|
+
del make_stratum_retention_policy_from_site_selection_algo
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from ..site_selection_strategy.site_selection_algorithms import (
|
|
2
|
+
tilted_algo as _site_selection_algo,
|
|
3
|
+
)
|
|
4
|
+
from ._make_stratum_retention_policy_from_site_selection_algo import (
|
|
5
|
+
make_stratum_retention_policy_from_site_selection_algo,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
Policy = make_stratum_retention_policy_from_site_selection_algo(
|
|
9
|
+
_site_selection_algo,
|
|
10
|
+
)
|
|
11
|
+
PolicySpec = Policy.policy_spec_t
|
|
12
|
+
|
|
13
|
+
# prevent name leakage
|
|
14
|
+
del make_stratum_retention_policy_from_site_selection_algo
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from ..site_selection_strategy.site_selection_algorithms import (
|
|
2
|
+
tilted_sticky_algo as _site_selection_algo,
|
|
3
|
+
)
|
|
4
|
+
from ._make_stratum_retention_policy_from_site_selection_algo import (
|
|
5
|
+
make_stratum_retention_policy_from_site_selection_algo,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
Policy = make_stratum_retention_policy_from_site_selection_algo(
|
|
9
|
+
_site_selection_algo,
|
|
10
|
+
)
|
|
11
|
+
PolicySpec = Policy.policy_spec_t
|
|
12
|
+
|
|
13
|
+
# prevent name leakage
|
|
14
|
+
del make_stratum_retention_policy_from_site_selection_algo
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from . import (
|
|
2
|
+
hanoi,
|
|
3
|
+
longevity_ordering_alternating,
|
|
4
|
+
longevity_ordering_descending,
|
|
5
|
+
longevity_ordering_naive,
|
|
6
|
+
longevity_ordering_piecewise_ascending,
|
|
7
|
+
oeis,
|
|
8
|
+
site_selection_eval,
|
|
9
|
+
site_selection_viz,
|
|
10
|
+
)
|
|
11
|
+
from .Literal import Literal
|
|
12
|
+
from .bit_ceil import bit_ceil
|
|
13
|
+
from .bit_count_immediate_zeros import bit_count_immediate_zeros
|
|
14
|
+
from .bit_count_leading_ones import bit_count_leading_ones
|
|
15
|
+
from .bit_decode_gray import bit_decode_gray
|
|
16
|
+
from .bit_drop_msb import bit_drop_msb
|
|
17
|
+
from .bit_encode_gray import bit_encode_gray
|
|
18
|
+
from .bit_floor import bit_floor
|
|
19
|
+
from .bit_invert import bit_invert
|
|
20
|
+
from .bit_reverse import bit_reverse
|
|
21
|
+
from .calc_dyadic_lcm_upper_bound import calc_dyadic_lcm_upper_bound
|
|
22
|
+
from .count_factors_of_2 import count_factors_of_2
|
|
23
|
+
from .enforce_typing import enforce_typing
|
|
24
|
+
from .fast_pow2_divide import fast_pow2_divide
|
|
25
|
+
from .fast_pow2_mod import fast_pow2_mod
|
|
26
|
+
from .get_powersof2triangle_val_at_index import (
|
|
27
|
+
get_powersof2triangle_val_at_index,
|
|
28
|
+
)
|
|
29
|
+
from .jupyter_hide_toggle import jupyter_hide_toggle
|
|
30
|
+
from .log_args_and_result import log_args_and_result
|
|
31
|
+
from .modulo import modulo
|
|
32
|
+
from .prepend_cmap_with_color import prepend_cmap_with_color
|
|
33
|
+
from .round_to_one_sigfig import round_to_one_sigfig
|
|
34
|
+
from .sign import sign
|
|
35
|
+
from .tee_release import tee_release
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"bit_ceil",
|
|
39
|
+
"bit_count_immediate_zeros",
|
|
40
|
+
"bit_count_leading_ones",
|
|
41
|
+
"bit_drop_msb",
|
|
42
|
+
"bit_decode_gray",
|
|
43
|
+
"bit_invert",
|
|
44
|
+
"bit_encode_gray",
|
|
45
|
+
"bit_floor",
|
|
46
|
+
"bit_reverse",
|
|
47
|
+
"calc_dyadic_lcm_upper_bound",
|
|
48
|
+
"count_factors_of_2",
|
|
49
|
+
"enforce_typing",
|
|
50
|
+
"fast_pow2_divide",
|
|
51
|
+
"fast_pow2_mod",
|
|
52
|
+
"get_powersof2triangle_val_at_index",
|
|
53
|
+
"jupyter_hide_toggle",
|
|
54
|
+
"Literal",
|
|
55
|
+
"log_args_and_result",
|
|
56
|
+
"modulo",
|
|
57
|
+
"prepend_cmap_with_color",
|
|
58
|
+
"round_to_one_sigfig",
|
|
59
|
+
"hanoi",
|
|
60
|
+
"longevity_ordering_naive",
|
|
61
|
+
"longevity_ordering_alternating",
|
|
62
|
+
"longevity_ordering_piecewise_ascending",
|
|
63
|
+
"longevity_ordering_descending",
|
|
64
|
+
"oeis",
|
|
65
|
+
"sign",
|
|
66
|
+
"site_selection_eval",
|
|
67
|
+
"site_selection_viz",
|
|
68
|
+
"tee_release",
|
|
69
|
+
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
def bit_ceil(n: int) -> int:
|
|
2
|
+
"""Calculate the smallest power of 2 not smaller than n."""
|
|
3
|
+
# adapted from https://github.com/mmore500/hstrat/blob/e9c2994c7a6514162f1ab685d88c374372dc1cf0/hstrat/_auxiliary_lib/_bit_ceil.py
|
|
4
|
+
assert n >= 0
|
|
5
|
+
if n:
|
|
6
|
+
# see https://stackoverflow.com/a/14267825/17332200
|
|
7
|
+
exp = (n - 1).bit_length()
|
|
8
|
+
res = 1 << exp
|
|
9
|
+
return res
|
|
10
|
+
else:
|
|
11
|
+
return 1
|