1 package org.djunits.value.storage; 2 3 /** 4 * Possible ways to store vectors and matrices, e.g. DENSE or SPARSE. 5 * <p> 6 * Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 7 * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>. 8 * </p> 9 * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a> 10 * @author <a href="https://www.tudelft.nl/staff/p.knoppers/">Peter Knoppers</a> 11 */ 12 public enum StorageType 13 { 14 /** 15 * Dense storage. Use Dense to store small quantities of values, or values where zero is not common, or larger access times 16 * are unacceptable, or memory availability is high. 17 */ 18 DENSE, 19 20 /** 21 * Sparse storage. Use Sparse to store large quantities of values when most are zero and larger access times are acceptable 22 * and memory availability is low. Changing a zero value to a non-zero value is CPU-time-expensive 23 */ 24 SPARSE; 25 26 }