ginkgo-project / ssget

Command line tool for working with matrices from the SuiteSparse Matrix Collection (sparse.tamu.edu)
Other
8 stars 4 forks source link

Build search command from config #4

Closed yhmtsai closed 4 years ago

yhmtsai commented 5 years ago

I write a script like Java interface to handle the option settings. Try to keep the same options and values on the http://sparse.tamu.edu I am not sure whether it is suitable in the ssget script.

the following is copied from build_from_config.md

BuildFromConfig

It try to allow the same options as the filters on (sparse.tamu.edu).

Usage

./build_from_config.sh configfile

The output is the searching command. ./ssget -s 'output'

In configfile, it allows use the // to mark the comments OPT_NAME:VAL for setting the option value

No means Not_Implement

Detail

For the OPT:min,max, it allows only min or max with keeping , OPT:,max means the condition OPT<=max

For the OPT:OPTION, it only allows one option now.

Difference from (sparse.tamu.edu)

Example

example in ssget: 400 <= #rows <= 450 and numerical symmertry >= 0.99

// Filename config
Rows:400,450
NumericalSymmetry:,0.99

the output of ./build_from_config config is [ @rows -ge 400 ] && [ @rows -le 450 ] && [ $(echo "@nsym <= 0.99" | bc) -eq 1 ]

// Filename config
Rows:200,
Columns:,300
Nonzeros:1000,
SpecialStructure:Symmetric
PositiveDefinite:true

output is [ @rows -ge 200 ] && [ @cols -le 300 ] && [ @nonzeros -ge 1000 ] && [[ @real == true ]] && [[ @rows == @cols ]] && [[ @nsym == 1 ]] && [[ @posdef == true ]]

yhmtsai commented 5 years ago

@tcojean, @thoasm I have fixed these comments. Please check them.