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

Method Clone

tensor/table/table.go:331–338  ·  view source on GitHub ↗

note: no really clean definition of CopyFrom -- no point of re-using existing table -- just clone it. Clone returns a complete copy of this table

()

Source from the content-addressed store, hash-verified

329
330// Clone returns a complete copy of this table
331func (dt *Table) Clone() *Table {
332 cp := NewTable().SetNumRows(dt.Rows)
333 cp.CopyMetaDataFrom(dt)
334 for i, cl := range dt.Columns {
335 cp.AddColumn(cl.Clone(), dt.ColumnNames[i])
336 }
337 return cp
338}
339
340// AppendRows appends shared columns in both tables with input table rows
341func (dt *Table) AppendRows(dt2 *Table) {

Callers 1

MeanTablesFunction · 0.95

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 5

CopyMetaDataFromMethod · 0.80
AddColumnMethod · 0.80
NewTableFunction · 0.70
SetNumRowsMethod · 0.65
CloneMethod · 0.65

Tested by

no test coverage detected