ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
Functions
fill.cpp File Reference

Fills a matrix with a vectorThis function fills a matrix m with a vector v. More...

#include "statsLib.h"

Go to the source code of this file.

Functions

void fill (const dmatrix &_d, const dvector &_v)
void fill (const dvar_matrix &_d, const dvar_vector &_v)

Detailed Description

Fills a matrix with a vector

This function fills a matrix m with a vector v.

The matrix must have the same number of elements as the vector. eg. fill(m,v);
Example;
vector x(1,50);
matrix m(1,5,1,10);
!! x.fill_seqadd(1,1);
!! fill(m,x);
!! cout<<m<<endl;
Produces the following output.

1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10

Parameters:
mis a dmatrix
vis a dvector.
Author:
Dave Fournier & Steve Martell
Date:
3/24/2011

Definition in file fill.cpp.


Function Documentation

void fill ( const dmatrix _d,
const dvector _v 
)
Author:
Steven James Dean Martell UBC Fisheries Centre
Date:
2011-07-11
Parameters:
_da data matix that is filled with vector v
_va data vector
See also:

Definition at line 40 of file fill.cpp.

void fill ( const dvar_matrix _d,
const dvar_vector _v 
)
Author:
Steven James Dean Martell UBC Fisheries Centre
Date:
2011-07-11
Parameters:
_da data matix that is filled with vector v
_va data vector
See also:

Definition at line 75 of file fill.cpp.