{"id":17140976,"url":"https://github.com/tpaviot/linearintegerinterpolation","last_synced_at":"2025-03-24T08:17:31.008Z","repository":{"id":140286274,"uuid":"364972801","full_name":"tpaviot/LinearIntegerInterpolation","owner":"tpaviot","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-07T03:47:03.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T13:29:26.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpaviot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-06T16:28:56.000Z","updated_at":"2021-05-07T03:47:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"0136c304-e381-4442-8f9a-1f84275d8f38","html_url":"https://github.com/tpaviot/LinearIntegerInterpolation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaviot%2FLinearIntegerInterpolation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaviot%2FLinearIntegerInterpolation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaviot%2FLinearIntegerInterpolation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaviot%2FLinearIntegerInterpolation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpaviot","download_url":"https://codeload.github.com/tpaviot/LinearIntegerInterpolation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245232915,"owners_count":20581703,"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":[],"created_at":"2024-10-14T20:23:56.749Z","updated_at":"2025-03-24T08:17:30.987Z","avatar_url":"https://github.com/tpaviot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Linear Integer Interpolation\n\nA python script to compute, from any real function, a linear interpolation using integer coefficients.\n\nGiven a real function \u003cimg src=\"https://render.githubusercontent.com/render/math?math=f(x)\"\u003e defined on a real interval \u003cimg src=\"https://render.githubusercontent.com/render/math?math=[a, b]\"\u003e and a number of subinterval \u003cimg src=\"https://render.githubusercontent.com/render/math?math=n\"\u003e, compute interpolated segments of the form \u003cimg src=\"https://render.githubusercontent.com/render/math?math=y=mx+p\"\u003e where n and m are integer numbers.\n\n\n```python\nfrom math import sin, cos\n\ndef f(x):\n    return -10.11 * sin(x) + 125.221 *cos(45.2 * x)\n\ninterp = linear_interpolation(f, interval=[10, 50], segments=20)\nprint(interp)\n```\n\n```bash\n[(56, 26), (23, 422), (-26, 1108), (-56, 1587), (-44, 1372),\n (1, 472), (44, -475), (53, -692), (22, 114), (-25, 1429), (-51, 2209),\n (-38, 1793), (5, 332), (44, -1072), (48, -1224), (14, 137), (-31, 2027),\n (-54, 3039), (-35, 2166), (12, -90), (50, -1990)]\n```\n\n![png](lii.svg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpaviot%2Flinearintegerinterpolation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpaviot%2Flinearintegerinterpolation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpaviot%2Flinearintegerinterpolation/lists"}