{"id":16690858,"url":"https://github.com/ddemidov/mba","last_synced_at":"2025-09-03T02:23:04.572Z","repository":{"id":10307939,"uuid":"12432274","full_name":"ddemidov/mba","owner":"ddemidov","description":"Scattered data interpolation with multilevel B-Splines","archived":false,"fork":false,"pushed_at":"2024-10-05T19:26:32.000Z","size":1450,"stargazers_count":75,"open_issues_count":11,"forks_count":24,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T11:08:56.566Z","etag":null,"topics":["c-plus-plus","multilevel-bsplines","python","scattered-data-interpolation"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddemidov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2013-08-28T11:49:39.000Z","updated_at":"2024-12-10T06:36:00.000Z","dependencies_parsed_at":"2022-08-31T08:22:20.913Z","dependency_job_id":"1cfb628c-2492-4f26-a89a-5df862891b6d","html_url":"https://github.com/ddemidov/mba","commit_stats":{"total_commits":80,"total_committers":8,"mean_commits":10.0,"dds":"0.32499999999999996","last_synced_commit":"eee210596a6ca1dbae989424c55b521afe1ff8c3"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ddemidov/mba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddemidov%2Fmba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddemidov%2Fmba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddemidov%2Fmba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddemidov%2Fmba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddemidov","download_url":"https://codeload.github.com/ddemidov/mba/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddemidov%2Fmba/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260109484,"owners_count":22960030,"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":["c-plus-plus","multilevel-bsplines","python","scattered-data-interpolation"],"created_at":"2024-10-12T16:05:48.007Z","updated_at":"2025-06-16T06:05:52.488Z","avatar_url":"https://github.com/ddemidov.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Scattered data interpolation with multilevel B-Splines\n\n[![Build Status](https://travis-ci.com/ddemidov/mba.svg?branch=master)](https://travis-ci.com/ddemidov/mba)\n\nThis library provides the adaptive MBA algorithm from [1] implemented in C++11.\nThis is a fast algorithm for scattered N-dimensional data interpolation and\napproximation. Python bindings are also provided.\n\nExample of 2D interpolation in C++:\n```cpp\n#include \u003cmba.hpp\u003e\n\nint main() {\n    // Coordinates of data points.\n    std::vector\u003cmba::point\u003c2\u003e\u003e coo = {\n        {0.0, 0.0},\n        {0.0, 1.0},\n        {1.0, 0.0},\n        {1.0, 1.0},\n        {0.4, 0.4},\n        {0.6, 0.6}\n    };\n\n    // Data values.\n    std::vector\u003cdouble\u003e val = {\n        0.2, 0.0, 0.0, -0.2, -1.0, 1.0\n    };\n\n    // Bounding box containing the data points.\n    mba::point\u003c2\u003e lo = {-0.1, -0.1};\n    mba::point\u003c2\u003e hi = { 1.1,  1.1};\n\n    // Initial grid size.\n    mba::index\u003c2\u003e grid = {3, 3};\n\n    // Algorithm setup.\n    mba::MBA\u003c2\u003e interp(lo, hi, grid, coo, val);\n\n    // Get interpolated value at arbitrary location.\n    double w = interp(mba::point\u003c2\u003e{0.3, 0.7});\n}\n```\n\nSame example in python:\n```.py\nfrom mba import *\n\ninterp = mba2(lo=[-0.1,-0.1], hi=[1.1,1.1], grid=[3,3],\n              coo=[ [0.0, 0.0], [0.0, 1.0], [1.0, 0.0],\n                    [1.0, 1.0], [0.4, 0.4], [0.6, 0.6] ],\n              val=[0.2, 0.0, 0.0, -0.2, -1.0, 1.0]\n              )\n\nw = interp([[0.3, 0.7]])\n```\n\nAlso see\n[python/example.ipynb](http://nbviewer.ipython.org/github/ddemidov/mba/blob/master/python/example.ipynb),\n[python/layered.ipynb](http://nbviewer.ipython.org/github/ddemidov/mba/blob/master/python/layered.ipynb).\n\n### References\n\n1. S. Lee, G. Wolberg, and S. Y. Shin. Scattered data interpolation with\n   multilevel B-Splines. IEEE Transactions on Visualization and\n   Computer Graphics, 3:228–244, 1997, [doi:10.1109/2945.620490](https://doi.org/10.1109/2945.620490).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddemidov%2Fmba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddemidov%2Fmba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddemidov%2Fmba/lists"}