compute

package
v0.0.0-...-812c778 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregated_StageDamage

func Aggregated_StageDamage(hps []hazardproviders.HazardProvider, sp consequences.StreamProvider, indexlocation geography.Location, terrainelevation float64, coutputfilepath string, soutputfilepath string)

func ComputeEAD

func ComputeEAD(damages []float64, freq []float64) float64

ComputeEAD takes an array of damages and frequencies and integrates the curve. we should probably refactor this into paired data as a function.

func ComputeSpecialEAD

func ComputeSpecialEAD(damages []float64, freq []float64) float64

ComputeSpecialEAD integrates under the damage frequency curve but does not calculate the first triangle between 1 and the first frequency.

Types

type Computeable

type Computeable struct {
	structureprovider.StructureProvider
	hazardproviders.HazardProvider
	consequences.ResultsWriter
	ComputeLifeloss bool
	LifelossSeed    int64
	ComplianceRate  float64
	ComputeByFips   bool
	FipsCode        string
}

func (Computeable) Compute

func (computable Computeable) Compute() error

type Config

type Config struct {
	structureprovider.StructureProviderInfo `json:"structure_provider_info"`
	hazardproviders.HazardProviderInfo      `json:"hazard_provider_info"`
	resultswriters.ResultsWriterInfo        `json:"results_writer_info"`
	ComputeLifeloss                         bool    `json:"compute_lifeloss"`
	LifelossSeed                            int64   `json:"lifeloss_seed,omitempty"`
	ComplianceRate                          float64 `json:"warning_compliance_rate"`
	ComputeByFips                           bool    `json:"compute_by_fips"`
	FipsCode                                string  `json:"fips_code"`
}

func (Config) CreateComputable

func (config Config) CreateComputable() (Computeable, error)

Jump to

Keyboard shortcuts

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