IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13919


Ignore:
Timestamp:
Jun 20, 2007, 10:33:17 AM (19 years ago)
Author:
Paul Price
Message:

Can't smooth in-place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psVectorSmooth.c

    r13918 r13919  
    2727    PS_ASSERT_FLOAT_LARGER_THAN(sigma, 0.0, NULL);
    2828    PS_ASSERT_FLOAT_LARGER_THAN(Nsigma, 0.0, NULL);
     29
     30    if (output == input) {
     31        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot smooth vector in-place.");
     32        return false;
     33    }
    2934
    3035    // relevant terms
     
    118123    PS_ASSERT_INT_POSITIVE(size, NULL);
    119124
     125    if (output == input) {
     126        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot smooth vector in-place.");
     127        return false;
     128    }
     129
    120130    long num = input->n;                // Number of elements
    121131    output = psVectorRecycle(output, num, input->type.type);
Note: See TracChangeset for help on using the changeset viewer.