{"id":19190318,"url":"https://github.com/seigtm/polynomial","last_synced_at":"2025-04-20T07:34:28.319Z","repository":{"id":47083794,"uuid":"358987243","full_name":"seigtm/Polynomial","owner":"seigtm","description":"A simple polynomial class that supports all basic operations.","archived":false,"fork":false,"pushed_at":"2021-11-28T13:29:15.000Z","size":223,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-08T19:16:10.993Z","etag":null,"topics":["cpp","cpp-library","homework","homework-assignments","polynomial","polynomial-arithmetic","polynomial-equations","polynomial-multiplication","polynomials"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seigtm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-17T21:36:01.000Z","updated_at":"2022-08-02T18:08:04.000Z","dependencies_parsed_at":"2022-09-03T16:21:08.599Z","dependency_job_id":null,"html_url":"https://github.com/seigtm/Polynomial","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seigtm%2FPolynomial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seigtm%2FPolynomial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seigtm%2FPolynomial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seigtm%2FPolynomial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seigtm","download_url":"https://codeload.github.com/seigtm/Polynomial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223822729,"owners_count":17208917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp-library","homework","homework-assignments","polynomial","polynomial-arithmetic","polynomial-equations","polynomial-multiplication","polynomials"],"created_at":"2024-11-09T11:33:43.080Z","updated_at":"2024-11-09T11:33:44.712Z","avatar_url":"https://github.com/seigtm.png","language":"CMake","readme":"# Polynomial C++ template class\n\n\u003e In mathematics, a polynomial is an expression consisting of variables (also called indeterminates) and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponentiation of variables.  \n\u003e (https://en.wikipedia.org/wiki/Polynomial)\n\n---\n\n## Constructors:\n\n```c++\nexplicit Polynomial(T value = T(0));\n\nPolynomial(std::initializer_list\u003cT\u003e init);\n\ntemplate\u003cclass InputIt\u003e\nPolynomial(InputIt first, InputIt last);\n```\n\n---\n\n## List of supported operators and functions:\n\n- unary;\n- addition;\n- substraction;\n- multiplication;\n- division;\n- comparison (equality);\n- bitwise (for std::cin and std::cout).\n\n---\n\n## Usage examples:\n\n```c++\nPolynomial\u003cdouble\u003e minuend{ 8.2, -3.1, 15.1, 0, 2.2 };\n\n// subtrahend = x^3 + 15x^2 + 6.1x + 4.2.\nPolynomial\u003cdouble\u003e subtrahend{ 4.2, 6.1, 15.0, 1 };\n\n// Output: 2.2x^4 - x^3 + 0.1x^2 - 9.2x + 4.\nstd::cout \u003c\u003c minuend - subtrahend;\n```\n\n```c++\n// multiplier = 5x^4 + 4x^3 + 3x^2 + 2x + 1.\nPolynomial\u003cint\u003e multiplier{ 1, 2, 3, 4, 5 };\n\n// Output: 25x^4 + 20x^3 + 15x^2 + 10x + 5.\nstd::cout \u003c\u003c 5 * multiplier;\n```\n\n```c++\n// first = 8.17x^2 - 15.1x + 3.\nstd::vector\u003cfloat\u003e firstData = { 3.0, -15.1, 8.17 };\nPolynomial\u003cfloat\u003e first(firstData.cbegin(), firstData.cend());\n\n// second = 8.17x^2 - 15.1x + 2.\nstd::vector\u003cfloat\u003e secondData = { 2.0, -15.1, 8.17 };\nPolynomial\u003cfloat\u003e second{ secondData.cbegin(), secondData.cend() };\n\n// Output: true, as expected.\nstd::cout \u003c\u003c std::boolalpha \u003c\u003c (first == (second + 1));\n```\n\n---\n\n## Cloning the repository:\n\n```bash\nbash\u003e git clone https://github.com/seigtm/Polynomial\n```\n\n---\n\n## Build requirements:\n\n- [cmake](https://cmake.org/) to configure the project (minimum required version is **3.5**).\n- [conan](https://conan.io/) to download all application dependencies.  \n  You can install **conan** by giving a command to **pip**:\n  ```bash\n  bash\u003e pip install --user conan\n  ```\n  To use **pip** you need to install the **python** interpreter. I highly recommend to install **python3**-based versions in order to avoid unexpected results when using **conan**.\n\n---\n\n## Configuring and build with conan and cmake:\n\nTo install with `conan`, execute the commands:\n\n```bash\nbash\u003e cd Polynomial\nbash\u003e conan install . -if build --build missing\n```\n\nTo build and run the project with `cmake`, execute:\n\n```bash\nbash\u003e cd build\nbash\u003e cmake ..\n```\n\nTo install and run the application, execute:\n\n```bash\nbash\u003e make\nbash\u003e cd bin\nbash\u003e ./main\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseigtm%2Fpolynomial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseigtm%2Fpolynomial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseigtm%2Fpolynomial/lists"}