t201 opened a new pull request #951: URL: https://github.com/apache/systemml/pull/951
Closes #941. ## `set intersection for numeric data`-Function The `set intersection for numeric data`-function implements the intersection of two matrices by taking into input known as sets. The function returns an intersection matrix which is knows as the set of the resultant set of the two intersecting matrices. ### Usage ```r m_intersect = function(Matrix[Double] X, Matrix[Double] Y) ``` ### Arguments | Name | Type | Default | Description | | :------ | :------------- | -------- | :---------- | | X | Matrix[Double] | -- | matrix X, set A | | Y | Matrix[Double] | -- | matrix Y, set B | ### Returns | Type | Description | | :------------- | :---------- | | Matrix[Double] | intersection matrix, set of intersecting items| ### Example ``` m_intersect = function(Matrix[Double] X, Matrix[Double] Y) return(Matrix[Double] R) { # compute indicator vector of intersection output X = (table(X, 1) != 0) Y = (table(Y, 1) != 0) n = min(nrow(X), nrow(Y)) I = X[1:n,] * Y[1:n,] # reconstruct integer values and create output R = removeEmpty(target=seq(1,n), margin="rows", select=I) } ```  P.S. The content of the document doesn't show up when i click on the function name in table of contents. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org