Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct {
Inventory []Receptor
}
Inventory provides a struct to allow for a slice of ConcequenceReceptor
type ParameterValue ¶
type ParameterValue struct {
Value interface{}
}
ParameterValue is a way to allow parameters to be either a scalar or a distribution.
func (ParameterValue) CentralTendency ¶
func (p ParameterValue) CentralTendency() float64
CentralTendency on a ParameterValue is intended to help set structure values content values and foundaiton heights to central tendencies.
func (ParameterValue) SampleValue ¶
func (p ParameterValue) SampleValue(input interface{}) float64
SampleValue on a ParameterValue is intended to help set structure values content values and foundaiton heights to uncertain parameters - this is a first draft of this interaction.
type Receptor ¶
type Receptor interface { Compute(event hazards.HazardEvent) (Result, error) Location() geography.Location }
Receptor is an interface for all things that can have consequences from a hazard event
type Result ¶
type Result struct { Headers []string `json:"headers"` Result []interface{} `json:"result"` }
Result is a container to store a list of headers and a list of results
func (Result) MarshalJSON ¶
type ResultAddable ¶
type ResultAddable interface {
AddResult(c Result) //is this too confusing? it works, but is it confusing?
}
ResultAddable gives me the ability to convert the results slice of interface into a table of slice of interface and store many results...
type Results ¶
Results stores a consequence struct and a boolean flagging the result as a table or not
func (*Results) AddResult ¶
AddResult fulfils the ConsequenceAddable interface on the Consequences struct
func (Results) MarshalJSON ¶
MarshalJSON a better printed version of results - this is my preferred way to print, but it is more complex
type ResultsWriter ¶
type ResultsWriter interface { Write(Result) Close() }
type StreamProcessor ¶
type StreamProcessor func(str Receptor)
type StreamProvider ¶
type StreamProvider interface { ByFips(fipscode string, sp StreamProcessor) ByBbox(bbox geography.BBox, sp StreamProcessor) }