EconPapers    
Economics at your fingertips  
 

The Design of C++ Classes for Scientific Computing

Søren Nielsen

Computing in Economics and Finance 1996 from Society for Computational Economics

Abstract: We consider the design of C++ classes for abstract data types that are useful in scientific computing, such as vectors and matrices that appear and disappear dynamically, have varying sizes, may be sparse, and that respond to the natural arithmetic operators. These classes should be memory-safe, in the sense that all dynamically allocated memory is automatically released when no longer needed, and copy-efficient in the sense that no data should be unnecessarily copied when objects are passed to or from functions and operators. A framework for designing such classes is developed. We introduce as a simple example the case of a dynamic array of numbers. We then expand this framework to more general container classes, exemplified by a dynamic array with elements of any type by use of a template. The design of C++ and possible extensions to the language are discussed informally along the way.

References: View complete reference list from CitEc
Citations:

Downloads: (external link)
http://www.unige.ch/ce/ce96/ps/nielsen.eps (application/postscript)
Our link check indicates that this URL is bad, the error code is: 404 Not Found

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:sce:scecf6:_042

Access Statistics for this paper

More papers in Computing in Economics and Finance 1996 from Society for Computational Economics Department of Econometrics, University of Geneva, 102 Bd Carl-Vogt, 1211 Geneva 4, Switzerland. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F. Baum ().

 
Page updated 2025-03-20
Handle: RePEc:sce:scecf6:_042