clt

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	X, H float64
}

type Card

type Card struct{ Label, Value, Caption string }

type Dist

type Dist struct {
	Prob []float64
	Mean float64
	SD   float64
}

Dist is the population as a normalized distribution plus its exact moments.

type Draggable

type Draggable[T any] struct {
	Value []T
	// contains filtered or unexported fields
}

Draggable — curvefit's grip leaf. Here the bars' heights are dragged; X is the fixed bin centre and the compute side ignores any X drift.

func (Draggable[T]) Grip

func (d Draggable[T]) Grip(i int) Ref

func (Draggable[T]) Reconcile

func (d Draggable[T]) Reconcile(saved any) any

func (Draggable[T]) WidgetView

func (d Draggable[T]) WidgetView() WidgetView

func (Draggable[T]) WithLeaf

func (d Draggable[T]) WithLeaf(sym string) Draggable[T]

type Handle

type Handle struct {
	At  Pt
	Ref Ref
}

type Markdown

type Markdown string

func (Markdown) Render

func (m Markdown) Render() Rendered

type MeansChart

type MeansChart struct {
	Hist []float64
	Mean float64
	SD   float64
}

MeansChart draws the sampling distribution of the mean with the predicted normal.

func (MeansChart) Render

func (c MeansChart) Render() Rendered

type PopChart

type PopChart struct {
	Bars  []Bar
	Grips []Handle
	Mean  float64
}

PopChart draws the draggable population histogram, grips at the bar tops.

func (PopChart) Render

func (c PopChart) Render() Rendered

type Pt

type Pt struct{ X, Y float64 }

type Readout

type Readout struct{ Cards []Card }

type Ref

type Ref struct {
	Leaf  string
	Index int
}

func (Ref) MarshalText

func (r Ref) MarshalText() ([]byte, error)

type Rendered

type Rendered struct{ MIME, Data string }

type Sampling

type Sampling struct {
	Hist     []float64
	PredMean float64
	PredSD   float64
	N        int
}

Sampling is the histogram of sample means (as a density) plus the CLT's predicted normal N(Mean, SD²).

type WidgetView

type WidgetView struct {
	Value   any
	Options []string
	Lo, Hi  *float64
	Max     *int
}

Jump to

Keyboard shortcuts

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