Skip to content
Snippets Groups Projects
  • Sander, Oliver's avatar
    6f3b9689
    Implement new method distanceSquared, between a double vector and an adouble one · 6f3b9689
    Sander, Oliver authored
    This is needed for the new gradientflow application.  The standard 'distance' method
    doesn't cut it, because it is not differentiable near zero.  Therefore, even the
    differentiable expression 'distance*distance' will fail to be differentiable for
    an automatic-differentiation system.  I think in the long run we should replace
    'distance' by 'distanceSquared' everywhere it is used.
    
    Unfortunately, this patch is hacky: it only adds the method for the double/adouble
    combination.
    6f3b9689
    History
    Implement new method distanceSquared, between a double vector and an adouble one
    Sander, Oliver authored
    This is needed for the new gradientflow application.  The standard 'distance' method
    doesn't cut it, because it is not differentiable near zero.  Therefore, even the
    differentiable expression 'distance*distance' will fail to be differentiable for
    an automatic-differentiation system.  I think in the long run we should replace
    'distance' by 'distanceSquared' everywhere it is used.
    
    Unfortunately, this patch is hacky: it only adds the method for the double/adouble
    combination.