MCPcopy Create free account
hub / github.com/cogentcore/core / SetFloat

Method SetFloat

tensor/table/table.go:584–597  ·  view source on GitHub ↗

SetFloat sets the float64 value of cell at given column (by name), row index for columns that have 1-dimensional tensors.

(column string, row int, val float64)

Source from the content-addressed store, hash-verified

582// SetFloat sets the float64 value of cell at given column (by name), row index
583// for columns that have 1-dimensional tensors.
584func (dt *Table) SetFloat(column string, row int, val float64) bool {
585 if !dt.IsValidRow(row) {
586 return false
587 }
588 ct := dt.ColumnByName(column)
589 if ct == nil {
590 return false
591 }
592 if ct.NumDims() != 1 {
593 return false
594 }
595 ct.SetFloat1D(row, val)
596 return true
597}
598
599// SetStringIndex sets the string value of cell at given column, row index
600// for columns that have 1-dimensional tensors. Returns true if set.

Callers 7

NewTestTableFunction · 0.95
NewSliceTableFunction · 0.95
TestGaussianGenFunction · 0.95
TestBinomialGenFunction · 0.95
TestPoissonGenFunction · 0.95
TestGammaGenFunction · 0.95
TestBetaGenFunction · 0.95

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 4

IsValidRowMethod · 0.95
ColumnByNameMethod · 0.95
NumDimsMethod · 0.65
SetFloat1DMethod · 0.65

Tested by 6

NewTestTableFunction · 0.76
TestGaussianGenFunction · 0.76
TestBinomialGenFunction · 0.76
TestPoissonGenFunction · 0.76
TestGammaGenFunction · 0.76
TestBetaGenFunction · 0.76