Categorygithub.com/nspcc-dev/netmap
modulepackage
1.7.0
Repository: https://github.com/nspcc-dev/netmap.git
Documentation: pkg.go.dev

# README

NetMap

Build Status codecov Report GitHub release

Demo

asciicast

select 1 Country, filter Location NE Asia Example 1

select 2 City, filter Location EQ Europe Example 2

Description

This is REPL for interacting with netmap in NEOFS and applying placement rules to it. Netmap and CRUSH enchacement with FILTERs is described in research plan.

Commands

To see help for specific command type command help.

help

help

Get a list of commands.

exit

exit

Exit program.

load

load <filename>

Load netmap from specified file.

save

save <filename>

Save netmap to specified file.

clear

clear

Clear current netmap.

select

select <number> <key>

Example:

>>> add 1 /Location:Europe/Country:Germany
>>> add 2 /Location:Europe/Country:Austria
>>> add 3 /Location:Asia/Country:Korea
>>> add 4 /Location:Asia/Country:Japan
>>> select 1 Location
>>> select 2 Country

filter

filter <key> <operation> <value>

Operation can be one of EQ, NE, LT, LE, GT, GE

Example:

>>> add 1 /Location:Europe/Country:Germany
>>> add 2 /Location:Europe/Country:Austria
>>> filter Country NE Austria

get-selection

get-selection

Get nodes from current selection.

Example:

>>> load /examples/map2
>>> select 1 Country
>>> filter Location NE Asia
>>> get-selection
[13 14]

clear-selection

clear-selection

Clear current selection.

dump-selection

dump-selection <filename>

Dump netmap in graphical format. If using docker, /pics directory is mounted as temp on host.

# Packages

No description provided by the author

# Functions

CapWeightFunc calculates weight which is equal to capacity.
FilterAND returns AND combination of filters.
FilterEQ returns filter, which checks if value is equal to v.
FilterGE returns filter, which checks if value is greater or equal than v.
FilterGT returns filter, which checks if value is greater than v.
FilterIn returns filter, which checks if value is in specified list.
FilterLE returns filter, which checks if value is less or equal than v.
FilterLT returns filter, which checks if value is less than v.
FilterNE returns filter, which checks if value is not equal to v.
FilterNotIn returns filter, which checks if value is not in specified list.
FilterOR returns OR combination of filters.
NewConstNorm returns a normalizer which returns a constant values.
NewFilter constructs SimpleFilter.
NewMaxAgg returns an aggregator which computes max value.
NewMaxNorm returns a normalizer which normalize values in range of 0.0 to 1.0 to a maximum value.
NewMeanAgg returns an aggregator which computes mean value by recalculating it on every addition.
NewMeanIQRAgg returns an aggregator which computes mean value of values from IQR interval.
NewMeanSumAgg returns an aggregator which computes mean value by keeping total sum.
NewMinAgg returns an aggregator which computes min value.
NewReverseMinNorm returns a normalizer which normalize values in range of 0.0 to 1.0 to a minimum value.
NewSigmoidNorm returns a normalizer which normalize values in range of 0.0 to 1.0 to a scaled sigmoid.
NewWeightFunc returns WeightFunc which multiplies normalized capacity and price.
PriceWeightFunc calculates weight which is equal to price.

# Constants

NodesBucket is the name for optionless bucket containing only nodes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Separator separates key:value pairs in string representation of options.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author