public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Stuart O Anderson" <soa@ri.cmu.edu>
To: gsl-discuss@sourceware.org
Subject: Adding new Vector/Matrix accessor functions
Date: Mon, 05 May 2008 20:09:00 -0000	[thread overview]
Message-ID: <7ed3bc8b0805031457g6ef4f51ei810283a9b1f084b0@mail.gmail.com> (raw)

I've run into a situation where it would be very convenient to be able
to get pointers to individual elements of GSL vector and matrices.
Currently I deal with this by using matrix and vector views of normal
C arrays.  However, if there were a pair of functions:
double *gsl_vector_get_ptr( gsl_vector *v, int offset )
double *gsl_matrix_get_ptr( gsl_vector *v, int row, int col )

This would make my code cleaner.  Does giving the user pointers to
single elements of the matrix/vector data break anything?

Stuart

             reply	other threads:[~2008-05-05 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 20:09 Stuart O Anderson [this message]
2008-05-06 20:25 ` Brian Gough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ed3bc8b0805031457g6ef4f51ei810283a9b1f084b0@mail.gmail.com \
    --to=soa@ri.cmu.edu \
    --cc=gsl-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).