Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

graph

What is a good network graph library for language X? [closed]

July 21, 2023 by Tarik

You should add graph-tool to the python list. It is very complete, and it is implemented in C++, with the Boost Graph Library, making it orders of magnitude faster than python-only alternatives, such as NetworkX. Disclaimer: I’m the author of graph-tool. 🙂

Categories language-agnostic Tags graph, graph-theory, language-agnostic Leave a comment

Graphviz Dot, mix directed and undirected

July 20, 2023 by Tarik

digraph { A; B; C subgraph Rel1 { edge [dir=none, color=red] A -> B -> C -> A } subgraph Rel2 { edge [color=blue] B -> C C -> A } }

Categories graph Tags graph, graphviz, relation, symmetry Leave a comment

How to persist a graph data structure in a relational database?

July 10, 2023 by Tarik

The answer is unfortunately: Your consideration is completely right in every point. You have to store Nodes (Vertices) in one table, and Edges referencing a FromNode and a ToNode to convert a graph data structure to a relational data structure. And you are also right, that this ends up in a large number of lookups, … Read more

Categories database Tags database, graph, relational-database Leave a comment

What is the maximum number of edges in a directed graph with n nodes? [closed]

June 29, 2023 by Tarik

If you have N nodes, there are N – 1 directed edges than can lead from it (going to every other node). Therefore, the maximum number of edges is N * (N – 1).

Categories math Tags graph, math, max Leave a comment

Dot graph language – how to make bidirectional edges automatically?

June 28, 2023 by Tarik

You should just use: A -> B [dir=both]

Categories graph Tags dot, graph, graphviz Leave a comment

Move X-Axis label downwards, but not X-Axis Ticks in matplotlib

June 19, 2023 by Tarik

use labelpad parameter: pl.xlabel(“…”, labelpad=20) or set it after: ax.xaxis.labelpad = 20

Categories python Tags graph, matplotlib, plot, python Leave a comment

How to plot multiple functions on the same figure

June 19, 2023 by Tarik

To plot multiple graphs on the same figure you will have to do: from numpy import * import math import matplotlib.pyplot as plt t = linspace(0, 2*math.pi, 400) a = sin(t) b = cos(t) c = a + b plt.plot(t, a, ‘r’) # plotting t, a separately plt.plot(t, b, ‘b’) # plotting t, b separately … Read more

Categories python Tags function, graph, matplotlib, plot, python Leave a comment

How to display all x labels in R barplot?

June 14, 2023 by Tarik
Categories r Tags axis-labels, bar-chart, graph, r Leave a comment

Explanation of runtimes of BFS and DFS

June 12, 2023 by Tarik

E is the set of all edges in the graph, as G={V,E}. So, |E| is count of all edges in the graph. This alone should be enough to convince you that the overall complexity can’t be |V| times |E|, since we are not iterating over all the edges in the graph for each vertex. In … Read more

Categories data-structures Tags breadth-first-search, data-structures, depth-first-search, graph, time-complexity Leave a comment

How to generate call-graphs for given javascript? [closed]

June 9, 2023 by Tarik

code2flow does exactly this. Full disclosure, I started this project To run $ code2flow source1.js source2.js -o out.gv Then, open out.gv with graphviz Edit: For now, this project is unmaintained. I would suggest trying out a different solution before using code2flow.

Categories javascript Tags call-graph, graph, javascript, visualization Leave a comment
Older posts
Newer posts
← Previous Page1 … Page6 Page7 Page8 … Page18 Next →

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa