Enhanced C#
Language of your choice: library documentation
Public Member Functions | List of all members
Loyc.Collections.IOptimize Interface Reference

Interface for an Optimize() method. More...


Source file:
Inheritance diagram for Loyc.Collections.IOptimize:
Loyc.Collections.IAutoSizeArray< T > Loyc.Collections.INegAutoSizeArray< T >

Remarks

Interface for an Optimize() method.

Public Member Functions

void Optimize ()
 Optimizes the data structure to consume less memory or storage space. More...
 

Member Function Documentation

◆ Optimize()

void Loyc.Collections.IOptimize.Optimize ( )

Optimizes the data structure to consume less memory or storage space.

Typically this method will take O(N) or O(N log N) time.

For example, a simple IAutoSizeArray<T> implementation could implement this method by examining the final elements and removing any that are equal to default(T).