[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] vector views

From: John Gehman
Subject: Re: [Help-gsl] vector views
Date: Mon, 7 May 2012 16:14:16 +1000

Vector views are 1D subsets of matrices -- e.g. if you wanted to refer to a 
given column of a matrix by a different, more convenient name. I'm working from 
memory here, but I'm not certain there are any functions to create a vector 
view with a subvector. I would have guessed you wanted a z = 2*N matrix, then 
create vector views from each of the two rows or columns to hold the real and 
imaginary channels in vector(like) structures. If you want to handle the vector 
view (vv) as an actual vector, which appears to be the case, you have use 

Good Luck,


John Gehman
School of Chemistry
University of Melbourne

On 07/05/2012, at 12:57 PM, Gideon Simpson wrote:

> Just wondering if someone can help me out with using vector views.  I have a 
> set of N complex numbers which I am storing in a 2*N size gsl_vector.  I am 
> using this because I am looking for the solution of a nonlinear system, and, 
> to the best of my knowledge, the multidimensional root finding algorithms 
> only take functions with gsl_vector arguments.
> So here's my question, does anyone have any tips on how to set up vector 
> views so that I have pointers available that logically map to the real and 
> imaginary portions of the vector?  I.e.,  I want
> gsl_vector * z // Size 2*N
> gsl_vector * a // Size N, a= Re z
> gsl_vector * b// Size N, b= Im z
> Thanks,
> -gideon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]