معرفی شرکت ها


comperm-2022.6.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Combination and permutation operations.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل comperm-2022.6.0
نام comperm
نسخه کتابخانه 2022.6.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده "谢方圆 (XIE Fangyuan)" <xie.fangyuan@foxmail.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/comperm/
مجوز MIT License Copyright (c) 2022 谢方圆 (XIE Fangyuan) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# ComPerm Version `2022.6.0` Combination and permutation operations. ## Installation ```shell pip install comperm ``` ## Combination Operations ```python from comperm.com_op import ComOp # Get the number of combinations given n and k print(ComOp.get_num(n=5, k=2)) # 10 # Get the lexicographical ordinal of a combination given n print(ComOp.combination_to_ordinal(n=5, combination=[2, 3])) # 4 # Get the combination given n, k and its lexicographical ordinal print(ComOp.ordinal_to_combination(n=5, k=2, o=4)) # [2, 3] ``` ## Permutation Operations ```python from comperm.per_op import PerOp # Get the number of permutations given n and k print(PerOp.get_num(n=5, k=2)) # 20 # Get the lexicographical ordinal of a permutation given n print(PerOp.permutation_to_ordinal(n=5, permutation=[2, 3])) # 5 # Get the permutation given n, k and its lexicographical ordinal print(PerOp.ordinal_to_permutation(n=5, k=2, o=5)) # [2, 3] ``` ## Unit Test Run testcases in all files: ```shell PYTHONPATH='src' python -m unittest discover -s tests ``` Run testcases in a file: ```shell python -m unittest tests/test_combinatorics_op.py python -m unittest tests/test_com_op.py python -m unittest tests/test_per_op.py ```


زبان مورد نیاز

مقدار نام
>=3.10 Python


نحوه نصب


نصب پکیج whl comperm-2022.6.0:

    pip install comperm-2022.6.0.whl


نصب پکیج tar.gz comperm-2022.6.0:

    pip install comperm-2022.6.0.tar.gz