[Developers] MAT inverse VEC?

John Sibert sibert at hawaii.edu
Sun Oct 28 18:05:21 PDT 2012


Hi Mollie,
Thanks for picking this up. Does anyone know if these functions are 
actually used anywhere in the AUTODIF library or by ADMB?
John

John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa

Visit the ADMB project http://admb-project.org/

On 10/24/2012 10:25 AM, Mollie Brooks wrote:
> Dave pointed out that I can figure it out with one test or another.
> So the answer is yes. I'll edit the documentation.
>
> DATA_SECTION
> 	matrix A(1,3,1,3);
> 	matrix B(1,3,1,3);
> PARAMETER_SECTION
> 	init_number dum;
> 	objective_function_value f;
> PRELIMINARY_CALCS_SECTION
> 	int ii=1;
> 	for(int i=1; i<=3; i++)
> 	{
> 		for(int j=1; j<=3; j++)
> 		{
> 			A(i,j)=ii++;
> 		}
> 	}		
> PROCEDURE_SECTION
> 	for(int i=1; i<=3; i++)
> 	{
> 		for(int j=1; j<=3; j++)
> 		{
> 			cout<<A(i,j)<<"  ";
> 		}
> 		cout<<endl;
> 	}
> 	B=MAT(VEC(A),3,3);
> 	for(int i=1; i<=3; i++)
> 	{
> 		for(int j=1; j<=3; j++)
> 		{
> 			cout<<B(i,j)<<"  ";
> 		}
> 		cout<<endl;
> 	}
> 	
> 	cout << norm2(A-MAT(VEC(A),3,3)) << endl;
>
>
> On 24 Oct 2012, at 4:10 PM, Mollie Brooks wrote:
>
>> Hi,
>> Can anyone confirm for me that the function MAT is the inverse of the function VEC? I only managed to find MAT because they are in the same file. I would have called it invVEC.
>>
>> http://admb-project.org/documentation/api/fvar__m43_8cpp_source.html
>>
>> http://admb-project.org/documentation/api/dmat29_8cpp.html#aaedad6a69ce5ef4c09ac02c3fb9ce471
>>
>> If so, I'm willing to fill in the documentation.
>> thanks,
>> Mollie
>>
>> Mollie Brooks
>> Postdoctoral Researcher, Ponciano Lab
>> Biology Department, University of Florida
>> http://people.biology.ufl.edu/mbrooks
>>
>>
>> _______________________________________________
>> Developers mailing list
>> Developers at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/developers
>>
> _______________________________________________
> Developers mailing list
> Developers at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/developers
>



More information about the Developers mailing list