An algorithm for fast 2D pattern-matching with wildcards.

Overview

pattern-match-2d.js

An algorithm for fast 2D pattern-matching with wildcards, with a demo app inspired by MarkovJunior (by Maxim Gumin).

Demo example

The algorithm uses a DFA to match individual rows of patterns in the rows of the grid, then another DFA to match the whole patterns by recognising vertical sequences of row matches. Scanning a rectangular area of the grid takes O((w + a)(h + b) + m) time where w, h are the width and height of the area, a, b are the maximum width and height of any pattern, and m is the the number of matches which were either made or broken in the scanned area.

You might also like...

Obsidian plugin: Implicitly add an alias matching the first heading in a document.

Alias from heading Aliases in Obsidian make it convenient to provide display names to document links. However, there are a few pain points: Aliases ar

Dec 17, 2022

Science! Testing various image matching algorithms' performance on the Pinecone vector DB

Image Matching Algorithms For Use With KNN Search As part of the development of alt-text.org, it's necessary to perform large-scale fuzzy matching of

Sep 3, 2022

InReach is the world’s first tech platform matching LGBTQ+ people with safe, verified resources.

Explore the screenshots » Report a Bug · Request a Feature . Ask a Question Table of Contents About Built With Getting Started Prerequisites Installat

Jan 3, 2023

Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command

cypress-thenify Rationale Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command. Howev

Oct 2, 2022

Implementação do Observer Pattern em TypeScript para o Código Fonte TV

Observer - Design Pattern Exemplos de implementação do Design Pattern Observer, descrito no livro Design Patterns: Elements of Reusable Object-Oriente

Nov 30, 2022

Ethereum smart contract gas cost waste pattern detection and patching tool

Ethereum smart contract gas cost waste pattern detection and patching tool

Ethereum smart contract gas cost waste pattern detection and patching tool

Mar 23, 2022

Rename image after pasting, support name pattern and auto renaming.

Rename image after pasting, support name pattern and auto renaming.

Obsidian paste image rename This plugin is inspired by Zettlr, Zettlr shows a prompt that allows the user to rename the image, this is a great help if

Jan 2, 2023

Connect your Ethereum smart contract to any real world API using the oracle pattern!

Minimal Viable Oracle (MVO) - An effective way to Build your own oracle with Solidity Smart contracts cannot access off-chain data directly. This repo

Aug 25, 2022

A probabilistic programming language based on pattern-rewriting

A probabilistic programming language based on pattern-rewriting

MJr-compiler MJr is a probabilistic programming language based on pattern-rewriting, heavily inspired by MarkovJunior by Maxim Gumin. This project pro

Dec 15, 2022
Owner
null
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
🤠 Functional utilities using object property paths with wildcards and regexps 🌵

?? Functional utilities using object property paths with wildcards and regexps. ?? Available functional methods include: ??️ Mapping: map() ?? Merging

ehmicky 29 Dec 15, 2022
🤠 Object property paths with wildcards and regexps 🌵

?? Object property paths with wildcards and regexps. ?? Get/set object properties using: ⛏️ Dot-delimited paths: foo.bar.0.baz ⭐ Wildcards: foo.*, **.

ehmicky 585 Jan 3, 2023
Fast and robust triangle-triangle intersection test with high precision for cross and coplanar triangles based on the algorithm by Devillers & Guigue.

fast-triangle-triangle-intersection Fast and robust triangle-triangle intersection test with high precision for cross and coplanar triangles based on

Technology and knowledge for interaction 10 Nov 15, 2022
Cardmatchinggamebyercan - A card-matching game made with Flutter.

card_matching_game_by_ercan A card-matching game. Working Demo: https://confident-austin-19dbd2.netlify.app Getting Started This project is a starting

Ercan Tomac 17 Dec 14, 2022
Venni backend - The backend of the Venni client apps implementing the credit card payments, matching algorithms, bank transfers, trip rating system, and more.

Cloud Functions Description This repository contains the cloud functions used in the Firebase backend of the Venni apps. Local Development Setup For t

Abrantes 1 Jan 3, 2022
Automaticly parses known pocket ips patch resources, scans folders or zip files for matching roms and applies the patches.

Pocket Automaton Automaticly parses known pocket ips patch resources, scans folders or zip files for matching roms and applies the patches. Usage pock

null 3 Nov 27, 2022
A web-based application for student-tutor matching service

CodeX A web-based application for student-tutor matching service This project was generated using Nx. ?? Smart, Fast and Extensible Build System Addin

null 3 Jan 25, 2022
Import flow for Excel (.xlsx) and CSV file with automated column matching and validation.

RSI react-spreadsheet-import ⚡️ A component used for importing XLS / XLSX / CSV documents built with Chakra UI. Import flow combines: ?? Uploader ⚙️ P

Ugnis 123 Dec 24, 2022