zenium

command module
v0.0.0-...-eab6cb2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

README

Project Zenium

codebeat badge Go Report Card

Zenium it'a a utility program to generate random data files.

Introductions

Dependencies

Installation

Keep in mind that this project is still WORK IN PROGRESS, so changes will be made.

cd $GOPATH/src
go get github.com/AndreaGhizzoni/zenium
./$GOPATH/bin/zenium -h

Structure of Generated Data

All generated data will be in the following format:

Slice
./$GOPATH/bin/zenium rslice -l 50 -o vector.txt -m 1 -M 10

This command generate a file called vector.txt that contains 50 random numbers, from 1 to 10 using current time as seed to generate it.

The file format is the follow:

n
x1 x2 [...] xn

Where n is the given length of vector (50 in the example) and x1 x2 [...] xn are all the generated numbers (with the properties see previously in the example) separated by space.

Matrix
./$GOPATH/bin/zenium matrix -o matrix.txt -c 10 -r 10 -m 1 -M 10

This command generate a file called matrix.txt that contains a 10x10 matrix of random numbers, from 1 to 10 using current time as seed to generate it.

The file format is the follow:

m n
x11 [...] x1n
x21
[...]
xm1 [...] xmn

Where m n is the given size of matrix (10 10 in the example) and listed below that all the elements of matrix: columns separated by space and rows by new line.

Bound
./$GOPATH/bin/zenium bound -o bound.txt -m -10 -M 10 -w 3 -a 10

This command generate a file called bound.txt that contains a list of 10 bounds of width 3, all in between -10 and 10.

The file format is the follow:

a
x1 y1
x2 y2
[...]
xa ya

Where a is the amount of bounds listed below, and for each line the bound is expressed as lower bound x and upper bound y, where m <= x < y <= M.

TODO

  • Slice (aka Vector)
  • Matrix
  • Complete -output|-o flag
  • Bound
  • Using math/big instead of all int64
  • Using crypto/rand in certain cases
  • Ordered Slice
  • Multiple generation with a single command

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package out contains the structure responsible to print on console or file all random data structure generated.
Package out contains the structure responsible to print on console or file all random data structure generated.
Package samples contain the number generator.
Package samples contain the number generator.
Package structures contains all data types necessary to store generated numbers, such as Bound.
Package structures contains all data types necessary to store generated numbers, such as Bound.
Package util contains common functions for all packages.
Package util contains common functions for all packages.

Jump to

Keyboard shortcuts

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