namespace BCG { /// /// The simplest implementation of the INode, with just one row in the node (the least memory effecient). /// The memory requirement of each node is 8 (next and prev pointers) + 4 (row) + 8 (overhead for the object) = 20 bytes. /// Should be used in conjunction with LightFriegnJoinRowList /// public class SimpleNode : INode { public IBlueRow? row; public SimpleNode? next; public SimpleNode? prev; public SimpleNode (IBlueRow r) : this (r, null, null) {} public SimpleNode(IBlueRow r, SimpleNode? nx, SimpleNode? pv) { row = r; next = nx; prev = pv; } #region INode Members public IBlueRow? getRow (int id) => row; public IBlueRow?[] getRows() => new[] { row }; public void replace (int id, IBlueRow nr) {row = nr;} #endregion } }