JLab

dataStructures
Class SparseVector

java.lang.Object
  extended by dataStructures.SparseVector

public class SparseVector
extends java.lang.Object

คลาสที่สร้างเวกเตอร์มากเลขศูนย์ด้วยรายการ

Author:
สมชาย ประสิทธิ์จูตระกูล

Constructor Summary
SparseVector(int length)
           
 
Method Summary
 SparseVector add(SparseVector v2)
           
 double dot(SparseVector v2)
           
 double get(int index)
           
 int length()
           
 void set(int index, double value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparseVector

public SparseVector(int length)
Method Detail

length

public int length()

get

public double get(int index)

set

public void set(int index,
                double value)

dot

public double dot(SparseVector v2)

add

public SparseVector add(SparseVector v2)

JLab