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

Method tRowValue

plot/plotcore/tablexy.go:132–147  ·  view source on GitHub ↗

tRowValue returns the y value at given true table row in table

(row int)

Source from the content-addressed store, hash-verified

130
131// tRowValue returns the y value at given true table row in table
132func (txy *tableXY) tRowValue(row int) float32 {
133 yc := txy.table.Table.Columns[txy.yColumn]
134 y := float32(0.0)
135 switch {
136 case yc.IsString():
137 y = float32(row)
138 case yc.NumDims() > 1:
139 _, sz := yc.RowCellSize()
140 if txy.yIndex < sz && txy.yIndex >= 0 {
141 y = float32(yc.FloatRowCell(row, txy.yIndex))
142 }
143 default:
144 y = float32(yc.Float1D(row))
145 }
146 return y
147}
148
149// Value returns the y value at given row in table
150func (txy *tableXY) Value(row int) float32 {

Callers 1

filterValuesMethod · 0.95

Calls 5

IsStringMethod · 0.65
NumDimsMethod · 0.65
RowCellSizeMethod · 0.65
FloatRowCellMethod · 0.65
Float1DMethod · 0.65

Tested by

no test coverage detected