Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:miw:miw08_rbs_ml:attributchange [2017/07/17 10:08]
pl:miw:miw08_rbs_ml:attributchange [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +Nie potrafię zapisać pliku na tej stronie. Dostaję niezrozumiały dla mnie komunikat <​code>"​Method Not Implemented
  
 +POST to /​wiki/​doku.php not supported."</​code>​
 +Dzieje się to podczas zapisywania gdy na stronie jest funkcja której teraz nie mam (zapisała się część bez metody public void WriteOldNewValues(String AttrName, WriteFile sw, Object[] obj)). Cały pliku znajduje się [[http://​student.agh.edu.pl/​~morcinek/​AGH/​MIW/​AttributChange.java | tutaj]].
 +<​code="​Java">​
 +import java.util.*;​
 +
 +/**
 + * Klasa zagreguje wartości porządkowe dla atrybutu o indeksie m_attrIndex
 + * @author Angello
 + *
 + */
 +public class AttributChange
 +{
 + Integer m_attrIndex;​
 + ArrayList<​Integer>​ m_list;
 +
 + /**
 + * Konstruktor
 + * @param tresholds
 + * @param attrIndex
 + */
 + public AttributChange(ArrayList<​Integer>​ tresholds, Integer attrIndex)
 + {
 + m_list = new ArrayList<​Integer>​(tresholds);​
 + m_attrIndex = attrIndex;
 + }
 +
 + /**
 + * Zmienia atrybuty dla całej tablicy
 + * @param learning
 + */
 + public void Change(Object[][] learning)
 + {
 + for (Object[] row : learning)
 + {
 + this.Change(row);​
 + }
 + }
 +
 +       /**
 +        * Funkcja zamienia atrybuty dla jednego przykładu
 +        * @param row
 +        */
 + public void Change(Object[] row)
 + {
 + Integer pastValue = (Integer) row[m_attrIndex];​ //​ Wartosc pierwotnego atrybutu
 + for (Integer i = 0; i < m_list.size();​ i++)
 + {
 + if (pastValue <= m_list.get(i))
 + {
 + row[m_attrIndex] = i; // Przypisanie wartości nowego atrybutu
 + return;
 + }
 + }
 + row[m_attrIndex] = m_list.size();​ //​ Jeśli nie zmieściło się w progach to jest to ostatnia wartość
 + }
 +
 + /**
 + * Zapisuje do pliku informację jak zostały zmienione atrybuty
 + * @param AttrName
 + * @param sw
 + */
 + public void WriteOldNewValues(String AttrName, WriteFile sw)
 + {
 + Object[] obj = new Object[24];
 + for (int i = 0; i < obj.length; i++) {
 + obj[i]=i;​
 + }
 + WriteOldNewValues(AttrName,​ sw, obj);
 + }
 +}
 +</​code>​
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0