示例#1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="voteList"></param>
        public VoteAnalyzer(List <Vote> voteList)
        {
            foreach (Vote vote in voteList)
            {
                VoteMap.Add(vote.Agent, vote.Target);
            }

            // 各計算を行う
            Calc();
        }
示例#2
0
        /// <summary>
        /// コンストラクタ(発話リストから投票宣言先を取得)
        /// </summary>
        /// <param name="talkList">発話リスト</param>
        /// <param name="topic">宣言を読み取るTopic(VOTE、ATTACK以外は無効)</param>
        public VoteAnalyzer(List <Agent> agentList, List <ExtTalk> talkList, Topic topic = Topic.VOTE)
        {
            // 投票宣言先の初期化
            foreach (Agent agent in agentList)
            {
                VoteMap.Add(agent, null);
            }

            // 全発話を読む
            foreach (ExtTalk talk in talkList)
            {
                Content content = talk.Content;

                // 投票宣言
                if (content.Operator == Operator.NOP && content.Topic == topic)
                {
                    VoteMap[talk.Agent] = content.Target;
                }
            }

            // 各計算を行う
            Calc();
        }