FUNCTION connected_in_simple_path
(* SCHEMA kinematic_motion_representation_schema; *)
FUNCTION connected_in_simple_path (connections : SET OF path_element_connection)
: BOOLEAN;
LOCAL
connection_set : SET [0 : ?] OF path_element_connection;
nec0 : INTEGER;
pec0 : INTEGER;
necbranch : INTEGER;
pecbranch : INTEGER;
END_LOCAL;
IF SIZEOF (connections) > 1 THEN
connection_set := QUERY (pec1 <* connections |
SIZEOF (QUERY (pec2 <* connections - pec1 |
pec1.next_element :=: pec2.previous_element)) = 0);
nec0 := SIZEOF (connection_set);
connection_set := QUERY (pec1 <* connections |
SIZEOF (QUERY (pec2 <* connections - pec1 |
pec2.next_element :=: pec1.previous_element)) = 0);
pec0 := SIZEOF (connection_set);
connection_set := QUERY (pec1 <* connections |
SIZEOF (QUERY (pec2 <* connections - pec1 |
pec1.next_element :=: pec2.previous_element)) > 1);
necbranch := SIZEOF (connection_set);
connection_set := QUERY (pec1 <* connections |
SIZEOF (QUERY (pec2 <* connections - pec1 |
pec2.next_element :=: pec1.previous_element)) > 1);
pecbranch := SIZEOF (connection_set);
IF ((nec0 <> 1) OR (pec0 <> 1) OR (necbranch > 0) OR (pecbranch > 0)) THEN
RETURN (FALSE);
ELSE
RETURN (TRUE);
END_IF;
ELSE
RETURN (TRUE);
END_IF;
END_FUNCTION;
Referenced By
Defintion connected_in_simple_path is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:14:00-04:00