On macOS, prebuilt MEX binaries may be unrecognised (e.g., arch/version mismatch). Users currently have to compile manually if the provied mex is not recognised. Please add an automatic check-and-build step that compiles required MEX files when they’re missing or incompatible.
When attempting to run binary MEX files for MATLAB on macOS, which is generated from the included .cpp files (e.g. test_MultilayerCommunity), MATLAB does not recognize them by default.

To resolve this, the following commands must be executed:
mex metanetwork_reduce.cpp group_index.cpp full.cpp sparse.cpp
mex group_handler.cpp group_index.cpp full.cpp sparse.cpp
Steps to Reproduce
- Navigate to the folder: BRAPH-2/braph2/measures/MEX_SRC.
- Execute the commands listed above.
Output
After running the first command:
mex metanetwork_reduce.cpp group_index.cpp full.cpp sparse.cpp
A new file is generated:
/Users/iok-ui/OnDevice/GitHub/BRAPH-2/braph2/measures/MEX_SRC/metanetwork_reduce.mexmaca64
After running the second command:
mex group_handler.cpp group_index.cpp full.cpp sparse.cpp
Another file is generated:
/Users/iok-ui/OnDevice/GitHub/BRAPH-2/braph2/measures/MEX_SRC/group_handler.mexmaca64
After these steps, the function test_MultilayerCommunity works successfully

On macOS, prebuilt MEX binaries may be unrecognised (e.g., arch/version mismatch). Users currently have to compile manually if the provied mex is not recognised. Please add an automatic check-and-build step that compiles required MEX files when they’re missing or incompatible.
When attempting to run binary MEX files for MATLAB on macOS, which is generated from the included .cpp files (e.g. test_MultilayerCommunity), MATLAB does not recognize them by default.

To resolve this, the following commands must be executed:
Steps to Reproduce
Output
After running the first command:
mex metanetwork_reduce.cpp group_index.cpp full.cpp sparse.cppA new file is generated:
/Users/iok-ui/OnDevice/GitHub/BRAPH-2/braph2/measures/MEX_SRC/metanetwork_reduce.mexmaca64
After running the second command:
mex group_handler.cpp group_index.cpp full.cpp sparse.cppAnother file is generated:
/Users/iok-ui/OnDevice/GitHub/BRAPH-2/braph2/measures/MEX_SRC/group_handler.mexmaca64
After these steps, the function test_MultilayerCommunity works successfully
