Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function A=transclose(A) | |
%returns the transitive closure matrix of the input matrix | |
%input: A(i,j) is 1 if the binary relation if (element i) R (element j) using the | |
%notation in the introduction of http://en.wikipedia.org/wiki/Transitive_closure | |
% | |
%Usage example: Implements the first example problem on https://www.4clojure.com/problem/84 | |
% | |
%divideskey=[2 3 4 8 9 27]; | |
%%I don't actually use that variable, but it keeps track of what my matrix means | |
% |