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

Method SetStringIndex

tensor/table/table.go:601–611  ·  view source on GitHub ↗

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

(column, row int, val string)

Source from the content-addressed store, hash-verified

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.
601func (dt *Table) SetStringIndex(column, row int, val string) bool {
602 if !dt.IsValidRow(row) {
603 return false
604 }
605 ct := dt.Columns[column]
606 if ct.NumDims() != 1 {
607 return false
608 }
609 ct.SetString1D(row, val)
610 return true
611}
612
613// SetString sets the string value of cell at given column (by name), row index
614// for columns that have 1-dimensional tensors. Returns true if set.

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
SetString1DMethod · 0.65

Tested by

no test coverage detected