okomarov/ismemberb

版本 1.0.0.0 (10.3 KB) 作者: Oleg Komarov
Ismember with reduced memory footprint through block processing
61.0 次下载
更新时间 2015/8/17

Applies ismember with flexible (reduced) memory footprint as shown in the snapshot.
If you are working with large datasets and ismember eats up completely the RAM, starts swapping on disk, freezes your pc, and causes lots of frustration, you might then want to split the task. This is what ismemberb() does for you, with equivalent results to ismember() applied to the whole dataset.
Syntax

The syntax:
=========
Basically, the same as in ismember() with the additional ability to specify in how many sub-blocks to process the inputs.

Examples:
========

% Run unit tests
ismemberb unit

% Default use
A = randi(100,[1e7,1]);
B = randi(100,[1e7,1]);
ismemberb(A,B)

% Custom block split
ismemberb(A,B, [2,3])

% Stress test vs ismember()
A = table(randi(1e6,[3e7,1]),randi(1e6,[3e7,1]));
B = table(randi(1e6,[3e7,1]),randi(1e6,[3e7,1]));
[idx1,pos1] = ismember(A,B);
[idx2,pos2] = ismemberb(A,B);

Issues:
======
Check and report new issues to https://github.com/okomarov/ismemberb/issues

引用格式

Oleg Komarov (2024). okomarov/ismemberb (https://github.com/okomarov/ismemberb), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2014a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库