Skip to content

Commit

Permalink
commented out the tutor because of changed method signatures in lang:…
Browse files Browse the repository at this point in the history
…:json::IO
  • Loading branch information
jurgenvinju committed Dec 18, 2024
1 parent 927373f commit 9380bf8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@
<goal>package</goal>
</goals>
</execution>
<execution>
<!-- commented out for bootstrapping purposes;
<execution>
<id>default-cli</id>
<phase>compile</phase>
<goals>
Expand All @@ -190,7 +191,7 @@
<ignore>${project.basedir}/src/org/rascalmpl/library/lang/rascal</ignore>
</ignores>
</configuration>
</execution>
</execution> -->
</executions>
</plugin>
<plugin>
Expand Down
6 changes: 1 addition & 5 deletions src/org/rascalmpl/library/lang/html5/DOM.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
module lang::html5::DOM

import List;
import Content;

@synopsis{Generic representation for all HTML tag types.}
@description{
Expand Down Expand Up @@ -459,7 +458,4 @@ str toString(HTML5Node x) {
attrs = { k | HTML5Attr k <- x.kids };
kids = [ k | value k <- x.kids, !(HTML5Attr _ := k) ];
return nodeToString(x.name, attrs, kids);
}

@synopsis{convenience function to render the HTML5Node dom tree in the browser}
public Content serve(HTML5Node x) = html(toString(x));
}
3 changes: 2 additions & 1 deletion src/org/rascalmpl/library/lang/rascal/vis/ImportGraph.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ void importGraph(PathConfig pcfg, bool hideExternals=true) {
title="Rascal Import/Extend Graph",
nodeClassifier=nodeClass,
edgeClassifier=edgeClass,
nodeLinker=modLinker
nodeLinker=modLinker,
edgeStyle=defaultEdgeStyle()[\curve-style=taxi()]
);

showInteractiveContent(graph(g, cfg=cfg), title=cfg.title);
Expand Down
21 changes: 21 additions & 0 deletions src/org/rascalmpl/library/vis/Graphs.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,27 @@ str formatCytoSelector(greaterEqual(str field, int lim)) = "[<field> \>= <lim>]"
str formatCytoSelector(lessEqual(str field, int lim)) = "[<field> \<= <lim>]";
str formatCytoSelector(less(str field, int lim)) = "[<field> \< <lim>]";
@synopsis{Choice of different node layout algorithms.}
@description{
The different algorithms use heuristics to find a layout
that shows the structure of a graph best. Different types
of graph data call for different algorithms:
* `grid` is best when there are very few edges or when edges are not important. The edge relation
is not used at all for deciding where each node will end up. Grid
is typically used for an initial exploration of the graph. It is very fast.
* `circle` puts all nodes on the edge of a circle and draws edges between them. The order on the
circle is arbitrary. This layout fails on larger collections of nodes because the points on the
circle will become really small and indistinguishable. However for graphs with less than 100 nodes
it provides a quick and natural overview.
* `breadthfirst` computes a breadthfirst spanning tree, and uses path length to decide on which
layer each node will reside. Cross-edges (between branches) and back-edges are allowed but if there
are many the graph will be messy. So this layout is best when you have a mostly hierarchical graph.
Examples are flow charts and dependency graphs.
* `cose` is a so-called "force-directed" layout. The edges become springs that both push nodes
apart as well as pull them together. Nodes drag on the surface but have an initial momentum such
that they can find a spot on the plain. This layout is very natural for scale-free networks such
as biological organisms, friends graphs and software ecosystems.
}
data CytoLayoutName
= grid()
| circle()
Expand Down

0 comments on commit 9380bf8

Please sign in to comment.