Home > manopt > manifolds > essential > privateessential > essential_distMinAnglePair_ft.m

essential_distMinAnglePair_ft

PURPOSE ^

Evaluate cost function for closest representative search given coefficients

SYNOPSIS ^

function ft=essential_distMinAnglePair_ft(t,m1,p1,c1,m2,p2,c2)

DESCRIPTION ^

Evaluate cost function for closest representative search given coefficients
function ft=essential_distMinAnglePair_ft(t,m1,p1,c1,m2,p2,c2)
Evaluates the cost function used by essential_distMinAnglePair to find the
closest representative in the equivalence class of a QREM
If m2,p2,c2 are omitted or empty, get value of a single term

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %Evaluate cost function for closest representative search given coefficients
0002 %function ft=essential_distMinAnglePair_ft(t,m1,p1,c1,m2,p2,c2)
0003 %Evaluates the cost function used by essential_distMinAnglePair to find the
0004 %closest representative in the equivalence class of a QREM
0005 %If m2,p2,c2 are omitted or empty, get value of a single term
0006 function ft=essential_distMinAnglePair_ft(t,m1,p1,c1,m2,p2,c2)
0007 flagSingleTerm=false;
0008 if ~exist('m2','var') || isempty(m2)
0009     flagSingleTerm=true;
0010 end
0011 
0012 if flagSingleTerm
0013     ft=acos((m1*sin(t+p1)+c1-1)/2)^2;
0014 else
0015     ft=acos((m1*sin(t+p1)+c1-1)/2)^2+acos((m2*sin(t+p2)+c2-1)/2)^2;
0016 end

Generated on Fri 08-Sep-2017 12:43:19 by m2html © 2005