ggg

command module
v0.0.0-...-066198e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

ggg(go GRAPH × GRAPH)

スクリーンショット 2020-09-30 22 50 16

ggg is a CLI tool for visualizing graph

ggg は、グラフ理論可視化サイト「GRAPH × GRAPH」をターミナル上で起動するための CLI ツールです。

Requirement

  • go1.15.1

Install(Update)

> go get -u github.com/monkukui/ggg
> ggg --help

を叩いて、起動すれば成功です。

Usage(簡易版)

各種オプションで、

  • 有向・無向
  • 重み付き・重みなし
  • 1-indexed・0-indexed

を選択できます。

デフォルトでは、重みなし無向グラフで 1-indexed を扱います。

詳細は

> ggg --help

で確認してください。

Start
> ggg

で起動します。

Copy & Paste
4 6
1 2
2 3
3 4
1 3
2 4
1 4

をコピーし、ターミナルにペーストします。

Visualize

グラフが可視化されます。

スクリーンショット 2020-09-30 22 49 33

Usage(詳細)

起動方法
> ggg

で起動します。

ヘルプコマンド
> ggg --help

でヘルプを表示します。

オプション

Command line flag syntax を用いて、グラフの形式を変更できます。

Flags Description default Usage
-i, --indexed 1-indexed であることを指定します。 1 -i 0, -i 1, --indexed=0, --indexed=1
-d, --directed 有向でグラフであることを指定します。 false -d
-w, --weighted 重み付きグラフであることを指定します。 false -w
Case Study
1-indexed、重みなし無向グラフ
> ggg

Options:
   indexed:  1
   directed:  false
   weighted:  false

Example:

   [1] ----- [2] ----- [3]

Format:
   3 2    (the number of nodes, the number of edges)
   1 2    (edge informations)
   2 3

Please input your graph.
>>> 
3 3
1 2
2 3
3 1
スクリーンショット 2020-10-01 17 21 57
0-indexed、重みなし有向グラフ
> ggg --indexed 0 --directed

Options:
   indexed:  0
   directed:  true
   weighted:  false

Example:

   [0] ----> [1] ----> [2]

Format:
   3 2    (the number of nodes, the number of edges)
   0 1    (edge informations)
   1 2

Please input your graph.
>>> 
3 3
0 1
1 2
2 0
スクリーンショット 2020-10-01 17 23 22
1-indexed、重みあり有向グラフ
> ggg --weighted --directed

Options:
   indexed:  1
   directed:  true
   weighted:  true

Example:

   [1] --5-> [2] --7-> [3]

Format:
   3 2    (the number of nodes, the number of edges)
   1 2 5  (edge informations)
   2 3 7

Please input your graph.
>>> 
3 2
1 2 5
2 3 7
スクリーンショット 2020-10-01 17 24 03

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL