IDEAS home Printed from https://ideas.repec.org/p/sce/scecf6/_042.html
   My bibliography  Save this paper

The Design of C++ Classes for Scientific Computing

Author

Listed:
  • Soren Nielsen

    (University of Texas)

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.

Suggested Citation

  • Soren Nielsen, "undated". "The Design of C++ Classes for Scientific Computing," Computing in Economics and Finance 1996 _042, Society for Computational Economics.
  • Handle: RePEc:sce:scecf6:_042
    as

    Download full text from publisher

    File URL: http://www.unige.ch/ce/ce96/ps/nielsen.eps
    Download Restriction: no
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:sce:scecf6:_042. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: https://edirc.repec.org/data/sceeeea.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.