.TRANSFORM.Math.indexFilter

Information

The return array is the size of the target array (if contained=true) or size of the difference of the arrays (if contained=false).

If a return value is 0 that means there was no match for that array value.


For example:

source[:] = {1,2,4,8,3};

target[3] = {3,1,8};


If contained = true; then:


y = {1,8,3}


If contained = false; then:

y = {2,4}

Interface

function indexFilter
  input Integer[:] source;
  input Integer[:] target;
  input Boolean contained = true;
  output Integer[if contained then size(target, 1) else size(source, 1) - size(target, 1)] result;
end indexFilter;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos