report

package
v0.0.0-...-7a5de80 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package report provides functions for constructing/generating report files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOutPrefix

func GetOutPrefix() string

func GetPicsDir

func GetPicsDir() string

GetPicsDirPrefix returns the path to the folder meant for plot pics.

func GetTexDir

func GetTexDir() string

GetPicsDirPrefix returns the path to the folder meant for tex files.

func SaveAndPrint

func SaveAndPrint(doPrint bool)

SaveAndPrint emits the tex files necessary to compile the report in full (report.tex, meta.sty) and prints the report.tex file to console.

func SaveComparisonOfMeans

func SaveComparisonOfMeans(p PicList, benchCount int)

SaveComparisonOfMeans saves each pic in the list to file, takes note of the saved file names.

func SavePicsToFile

func SavePicsToFile(pls, plsMean []PicList, algoName string)

SavePicsToFile saves each pic list for all bench funcs of a specified algo to a file.

func SaveTableToFile

func SaveTableToFile(t Table)

func SaveTexAllPics

func SaveTexAllPics()

SaveTexAllPics feeds all paths of generated pics to a template that creates `allpics.tex` file, which then aggregates all tex files tracking plot pics in one place.

func SaveTexAllTables

func SaveTexAllTables()

Types

type Pic

type Pic struct {
	Caption  string
	FilePath string
	Bench    string // optionally set.
}

Pic holds path to pic along with its caption. Bench field is set optionally (e.g. in case of the pic depicting comparison of means).

func NewPic

func NewPic() *Pic

NewPic returns a new copy of Pic.

type PicList

type PicList struct {
	Algo  string
	Bench string
	Pics  PlotPics
}

PicList is a structure holding a slice of pics and {bench,algo} metadata.

func NewPicList

func NewPicList() *PicList

NewPicList returns a new copy of PicList.

type PlotPics

type PlotPics []Pic

func (PlotPics) Len

func (p PlotPics) Len() int

Len implements the sort.Interface.

func (PlotPics) Less

func (p PlotPics) Less(i, j int) bool

Less implements the sort.Interface. note: sorting based on filename

func (PlotPics) Swap

func (p PlotPics) Swap(i, j int)

Swap implements the sort.Interface.

type Row

type Row struct {
	// Title of the row should contain the settings used to get the Values.
	Title  string
	Values []float64
}

func NewRow

func NewRow() *Row

type Table

type Table struct {
	Algo      string
	Header    []string
	ColLayout []string
	Rows      []Row
}

func NewTable

func NewTable() *Table

Jump to

Keyboard shortcuts

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