- sziku69: Fűzzük össze a szavakat :)
- f(x)=exp(x): A laposföld elmebaj: Vissza a jövőbe!
- Parci: Milyen mosógépet vegyek?
- Luck Dragon: Asszociációs játék. :)
- KISDUCK: Diétás kaja tipp
- bambano: Bambanő háza tája
- gban: Ingyen kellene, de tegnapra
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- hcl: Kínai tápos Philips
- mefistofeles: Az elhízás nem akaratgyengeség!
Új hozzászólás Aktív témák
-
axioma
veterán
válasz
axioma
#10243
üzenetére
Na valahogy igy nez ki:
public interface ProjMatrix<M> {
public ProjMatrix(double[][] mtx);
public ProjMatrix(M mtx);
public M getUnderlying();
public ProjMatrix add(M mtx);
..
}
Es van harom megvalositas, ebbol ketto ketretegu, az Nd4j-s hasonlo ehhez:public class ApacheMatrix implements ProjMatrix<RealMatrix> {
private final RealMatrix underlying;
public ApacheMatrix(double[][] mtx){... underlying=new RealMatrix(mtx); ...}
public ApacheMatrix(RealMatrix mtx){ underlying=mtx; }
public RealMatrix getUnderlying() { return underlying; }
public ApacheMatrix add(RealMatrix other) { return new ApacheMatrix(underlying.add(other.getUnderlying());}
...Es en csinalnek egy ilyet:
public class FlatMatrix implements ProjMatrix<FlatMatrix> {
private final double[] data;
private final dataLen;
... // segedvaltozok
public FlatMatrix(double[][] mtx) { ....dataLen=...; data=new double[dataLen]; ...}
public FlatMatrix getUnderlying() { return this;}
public FlatMatrix add(FlatMatrix other) { ... }
...Persze ebben az esetben az underlying-gal nem lehet "szepen" konstrualni, az tulkepp egy masolas lesz, de ennek nem lenne jelentosege.
Csak fejbol kb. a lenyeg, lehet benne egyeb hiba, nem az szamit, hanem a konstrukcio osszessegeben mehet-e igy minden gond nelkul.Kosz!
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Apple iPad 10th Wi-Fi + Cellular - Silver - 64GB - BONTATLAN - ÚJ
- GYÖNYÖRŰ iPhone 12 Pro 256GB Pacific Blue-1 ÉV GARANCIA -Kártyafüggetlen, MS4339, 100% Akksi
- Újszerű, frissen pasztázott PlayStation 4 Pro, GoldHEN + 20db játék (Cyberpunk, God of War, stb.)
- ÁRGARANCIA!Épített KomPhone i5 10400F 16/32/64GB RAM RTX 3060 12GB GAMER PC termékbeszámítással
- iPhone 17 Pro 256 GB Silver - Bontatlan !! www.stylebolt.hu - Apple eszközök - Számlás
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs

