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

Method SetFloatIndex

tensor/table/table.go:570–580  ·  view source on GitHub ↗

Set SetFloatIndex sets the float64 value of cell at given column, row index for columns that have 1-dimensional tensors. Returns true if set.

(column, row int, val float64)

Source from the content-addressed store, hash-verified

568// SetFloatIndex sets the float64 value of cell at given column, row index
569// for columns that have 1-dimensional tensors. Returns true if set.
570func (dt *Table) SetFloatIndex(column, row int, val float64) bool {
571 if !dt.IsValidRow(row) {
572 return false
573 }
574 ct := dt.Columns[column]
575 if ct.NumDims() != 1 {
576 return false
577 }
578 ct.SetFloat1D(row, val)
579 return true
580}
581
582// SetFloat sets the float64 value of cell at given column (by name), row index
583// for columns that have 1-dimensional tensors.

Callers 2

MakeRowMethod · 0.80
PlotMethod · 0.80

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 3

IsValidRowMethod · 0.95
NumDimsMethod · 0.65
SetFloat1DMethod · 0.65

Tested by

no test coverage detected