Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
/* +=======================================================================
* |
* | PlantUML : a free UML diagram generator
* |
* +=======================================================================
*
* (C) Copyright 2009-2024, Arnaud Roques
*
* Project Info: https://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* https://plantuml.com/patreon (only 1$ per month!)
* https://plantuml.com/liberapay (only 1€ per month!)
* https://plantuml.com/paypal
*
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the Revised BSD License.
*
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the University of California, Berkeley nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* PlantUML can occasionally display sponsored or advertising messages. Those
* messages are usually generated on welcome or error images and never on
* functional diagrams.
* See https://plantuml.com/professional if you want to remove them
*
* Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML
* are owned by the author of their corresponding sources code (that is, their
* textual description in PlantUML language). Those images are not covered by
* this BSD license.
*
* The generated images can then be used without any reference to the BSD license.
* It is not even necessary to stipulate that they have been generated with PlantUML,
* although this will be appreciated by the PlantUML team.
*
* There is an exception : if the textual description in PlantUML language is also covered
* by any license, then the generated images are logically covered
* by the very same license.
*
* This is the IGY distribution (Install GraphViz by Yourself).
* You have to install GraphViz and to setup the GRAPHVIZ_DOT environment variable
* (see https://plantuml.com/graphviz-dot )
*
* Icons provided by OpenIconic : https://useiconic.com/open
* Archimate sprites provided by Archi : http://www.archimatetool.com
* Stdlib AWS provided by https://github.com/milo-minderbinder/AWS-PlantUML
* Stdlib Icons provided https://github.com/tupadr3/plantuml-icon-font-sprites
* ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen
* ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman
* CafeUndZopfli ported by Eugene Klyuchnikov https://github.com/eustas/CafeUndZopfli
* Brotli (c) by the Brotli Authors https://github.com/google/brotli
* Themes (c) by Brett Schwarz https://github.com/bschwarz/puml-themes
* Twemoji (c) by Twitter at https://twemoji.twitter.com/
*
*/
package gen.lib.dotgen;
import static gen.lib.cgraph.edge__c.aghead;
import static gen.lib.cgraph.edge__c.agtail;
import static gen.lib.cgraph.node__c.agfstnode;
import static gen.lib.cgraph.node__c.agnxtnode;
import static gen.lib.common.utils__c.UF_find;
import static smetana.core.Macro.GD_comp;
import static smetana.core.Macro.GD_n_nodes;
import static smetana.core.Macro.GD_nlist;
import static smetana.core.Macro.GD_rankleader;
import static smetana.core.Macro.ND_clust;
import static smetana.core.Macro.ND_flat_in;
import static smetana.core.Macro.ND_flat_out;
import static smetana.core.Macro.ND_in;
import static smetana.core.Macro.ND_mark;
import static smetana.core.Macro.ND_next;
import static smetana.core.Macro.ND_out;
import static smetana.core.Macro.ND_prev;
import static smetana.core.Macro.ND_rank;
import static smetana.core.debug.SmetanaDebug.ENTERING;
import static smetana.core.debug.SmetanaDebug.LEAVING;
import gen.annotation.Difficult;
import gen.annotation.Original;
import gen.annotation.Reviewed;
import h.ST_Agedge_s;
import h.ST_Agnode_s;
import h.ST_Agraph_s;
import h.ST_elist;
import smetana.core.CArrayOfStar;
import smetana.core.Globals;
import smetana.core.ZType;
public class decomp__c {
@Reviewed(when = "14/11/2020")
@Original(version="2.38.0", path="lib/dotgen/decomp.c", name="begin_component", key="7ggrwt0f912kp1marrxdjq155", definition="static void begin_component(void)")
public static void begin_component(Globals zz) {
ENTERING("7ggrwt0f912kp1marrxdjq155","begin_component");
try {
GD_nlist(zz.G_decomp, null);
zz.Last_node_decomp = null;
} finally {
LEAVING("7ggrwt0f912kp1marrxdjq155","begin_component");
}
}
@Reviewed(when = "14/11/2020")
@Original(version="2.38.0", path="lib/dotgen/decomp.c", name="add_to_component", key="7icc6b2pvnj6te1yndbel47gg", definition="static void add_to_component(node_t * n)")
public static void add_to_component(Globals zz, ST_Agnode_s n) {
ENTERING("7icc6b2pvnj6te1yndbel47gg","add_to_component");
try {
GD_n_nodes(zz.G_decomp, GD_n_nodes(zz.G_decomp)+1);
ND_mark(n, zz.Cmark);
if (zz.Last_node_decomp!=null) {
ND_prev(n, zz.Last_node_decomp);
ND_next(zz.Last_node_decomp, n);
} else {
ND_prev(n, null);
GD_nlist(zz.G_decomp, n);
}
zz.Last_node_decomp = n;
ND_next(n, null);
} finally {
LEAVING("7icc6b2pvnj6te1yndbel47gg","add_to_component");
}
}
@Difficult
@Reviewed(when = "14/11/2020")
@Original(version="2.38.0", path="lib/dotgen/decomp.c", name="end_component", key="5o8hxpr6ppi15pinuy79m7u04", definition="static void end_component(void)")
public static void end_component(Globals zz) {
ENTERING("5o8hxpr6ppi15pinuy79m7u04","end_component");
try {
int i;
i = GD_comp(zz.G_decomp).size++;
GD_comp(zz.G_decomp).list = CArrayOfStar.REALLOC(GD_comp(zz.G_decomp).size, GD_comp(zz.G_decomp).list, ZType.ST_Agnode_s);
GD_comp(zz.G_decomp).list.set_(i, GD_nlist(zz.G_decomp));
} finally {
LEAVING("5o8hxpr6ppi15pinuy79m7u04","end_component");
}
}
@Difficult
@Reviewed(when = "14/11/2020")
@Original(version="2.38.0", path="lib/dotgen/decomp.c", name="search_component", key="c5u5lnfbu0pmlk6vsvyrdj8ep", definition="static void search_component(graph_t * g, node_t * n)")
public static void search_component(Globals zz, ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component");
try {
int c, i;
final ST_elist vec[] = new ST_elist[] {new ST_elist(),new ST_elist(),new ST_elist(),new ST_elist()};
ST_Agnode_s other;
ST_Agedge_s e;
add_to_component(zz, n);
vec[0].___(ND_out(n));
vec[1].___(ND_in(n));
vec[2].___(ND_flat_out(n));
vec[3].___(ND_flat_in(n));
for (c = 0; c <= 3; c++) {
if (vec[c].list != null)
for (i = 0; (e = (ST_Agedge_s) vec[c].list.get_(i))!=null; i++) {
if ((other = aghead(e))== n)
other = agtail(e);
if ((ND_mark(other) != zz.Cmark) && (other == UF_find(other)))
search_component(zz, g, other);
}
}
} finally {
LEAVING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component");
}
}
@Difficult
@Reviewed(when = "14/11/2020")
@Original(version="2.38.0", path="lib/dotgen/decomp.c", name="decompose", key="2t7r964kqtl5qrl7i57i22tqy", definition="void decompose(graph_t * g, int pass)")
public static void decompose(Globals zz, ST_Agraph_s g, int pass) {
ENTERING("2t7r964kqtl5qrl7i57i22tqy","decompose");
try {
ST_Agraph_s subg;
ST_Agnode_s n, v;
zz.G_decomp = g;
if (++zz.Cmark == 0)
zz.Cmark = 1;
GD_comp(g).size = 0;
GD_n_nodes(g, 0);
for (n = agfstnode(zz, g); n!=null; n = agnxtnode(zz, g, n)) {
v = n;
if ((pass > 0) && (subg = ND_clust(v))!=null)
v = GD_rankleader(subg).get_(ND_rank(v));
else if (v != UF_find(v))
continue;
if (ND_mark(v) != zz.Cmark) {
begin_component(zz);
search_component(zz, g, v);
end_component(zz);
}
}
} finally {
LEAVING("2t7r964kqtl5qrl7i57i22tqy","decompose");
}
}
}