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

Method StringValue

tensor/table/table.go:491–503  ·  view source on GitHub ↗

NOTE: String conflicts with [fmt.Stringer], so we have to use StringValue StringValue returns the string value of cell at given column (by name), row index for columns that have 1-dimensional tensors. Returns "" if column is not a 1-dimensional tensor or row not valid.

(column string, row int)

Source from the content-addressed store, hash-verified

489// for columns that have 1-dimensional tensors.
490// Returns "" if column is not a 1-dimensional tensor or row not valid.
491func (dt *Table) StringValue(column string, row int) string {
492 if !dt.IsValidRow(row) {
493 return ""
494 }
495 ct := dt.ColumnByName(column)
496 if ct == nil {
497 return ""
498 }
499 if ct.NumDims() != 1 {
500 return ""
501 }
502 return ct.String1D(row)
503}
504
505// TensorIndex returns the tensor SubSpace for given column, row index
506// for columns that have higher-dimensional tensors so each row is

Callers

nothing calls this directly

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 4

IsValidRowMethod · 0.95
ColumnByNameMethod · 0.95
NumDimsMethod · 0.65
String1DMethod · 0.65

Tested by

no test coverage detected