Author: Not specified Language: python
Description: (v4) Timestamp: 2018-05-21 03:10:07 +0000
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply
  1. def compute_range(alphas,i,j,data,C):
  2.     if (data[i,2] != data[j,2]):
  3.         L = max(0,alphas[j]-alphas[i])
  4.         H = min(C,C+alphas[j]-alphas[i])
  5.     elif (data[i,2] == data[j,2]):  
  6.         L = max(0,alphas[i]+alphas[j]-C)
  7.         H = min(C,alphas[i]+alphas[j])
  8.     return L,H    
  9.  
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply