public override void Start()
    {
        base.Start();

        menue = FindObjectOfType <MenueScript>();
        if (menue == null)
        {
            Debug.Log("Did not find a valid menue!");
            return;
        }
        menue.AddDiscreteSlider("K", this);
        menue.addToggle("KMeanConvergence", this);
        menue.ClusterNumber.SetActive(true);
        menue.LoopNumber.SetActive(true);
        menue.KMeanStartButton.SetActive(true);


//		NumberOfClusters();

        var dataItems = _rawInputData.GetDataItems();

        foreach (var dataItem in dataItems)
        {
            _input.Add(dataItem.GetfirstThreeNumericColsAsVector());
        }


//		Init(K,_input);
//		SetOutputData(_simpleDataModel);
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        menue = FindObjectOfType <MenueScript>();
        if (menue == null)
        {
            Debug.Log("Did not find a valid menue!");
            return;
        }
        // Create a toggle and instantly assign this script as listener.
        menue.addToggle("showXAxis", this);
        menue.addToggle("showYAxis", this);

        // Create a toggle with no listener. Add this element as a listener afterwards. An arbitrary amount of listeners can be added.
        int id = menue.addToggle("showZAxis", null);

        menue.addListener(id, this);

//        menue.AddDiscreteSlider("K", this);
//        menue.addToggle("KMeanConvergence", this);
    }