%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2021-2025. All Rights Reserved.
%%
%% %CopyrightEnd%

[;1m  join(Relation1, I, Relation2, J)[0m

  Returns the natural join of the relations [;;4mRelation1[0m and [;;4m[0m
  [;;4mRelation2[0m on coordinates [;;4mI[0m and [;;4mJ[0m.

[;1mExamples[0m

    1> R1 = sofs:relation([{a,x,1},{b,y,2}]).
    2> R2 = sofs:relation([{1,f,g},{1,h,i},{2,3,4}]).
    3> J = sofs:join(R1, 3, R2, 1).
    4> sofs:to_external(J).
    [{a,x,1,f,g},{a,x,1,h,i},{b,y,2,3,4}]
