Package gnu.trove.map.hash

Examples of gnu.trove.map.hash.TIntIntHashMap.adjustOrPutValue()


          if (data[l][t] == -1)
            continue;
          int tI = data[l][t] + templets.offset[t][tS]; // 特征索引:找到对应weights的维数
          int pI = data[l][t] + templets.offset[t][pS]; // 特征索引:找到对应weights的维数
          if (tI != pI) {
            diffF.adjustOrPutValue(tI, 1, 1);
            diffF.adjustOrPutValue(pI, -1, -1);
            diffW += weights[tI] - weights[pI]; // w^T(f(x,y)-f(x,ybar))
          }
        }
      }
View Full Code Here


            continue;
          int tI = data[l][t] + templets.offset[t][tS]; // 特征索引:找到对应weights的维数
          int pI = data[l][t] + templets.offset[t][pS]; // 特征索引:找到对应weights的维数
          if (tI != pI) {
            diffF.adjustOrPutValue(tI, 1, 1);
            diffF.adjustOrPutValue(pI, -1, -1);
            diffW += weights[tI] - weights[pI]; // w^T(f(x,y)-f(x,ybar))
          }
        }
      }
    }
View Full Code Here

        final TIntIntHashMap map = new TIntIntHashMap();
   
        for (int i = 0; i < CHARS.length - 1; i++)
        {
            final int bigram = CHARS[i] << 16 | CHARS[i+1];
            map.adjustOrPutValue(bigram, 1, 1);
        }
   
        guard = map.size();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.