コード例 #1
0
ファイル: Emotion.java プロジェクト: petercrlane/chrest
 public static Emotion add(Emotion e1, Emotion e2) {
   BasicEmotion[] basic_emotion_list = listEmotions(e1.getTheory());
   Emotion newemotion = new Emotion(e1.getTheory());
   // Object _newcomps = _components.clone();
   for (BasicEmotion basic : basic_emotion_list) {
     double val1 = e1.getComponentValue(basic);
     double val2 = e2.getComponentValue(basic);
     newemotion.putComponentValue(basic, val1 + val2);
   }
   return newemotion;
 }