quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_math_vector.a #include <VectorUshort.h> VectorUshort(long length = DEF_LENGTH, ushort value = DEF_VALUE); VectorUshort(const VectorUshort& vector);
description:VectorUshort val0(5); ushort mean; ushort variance; val0.assign(L"1, 2, 3, 4, 5"); mean = val0.mean(); if (mean != 3) { Error::handle(val0.name(), L"mean", Error::TEST, __FILE__, __LINE__); Integral::exit(); } variance = val0.var();
static const String CLASS_NAME = L"VectorUshort";
static const long ERR = 22200;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
~VectorUshort();
VectorUshort(long length = DEF_LENGTH, ushort value = DEF_VALUE );
VectorUshort(const VectorUshort& vector);
assign methods are inherited from the MVector class
VectorUshort& operator= (const VectorUshort& vector);
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME);
these methods are inherited from the MVector class
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
VectorUshort(const String& arg, unichar delim_a = DEF_DELIM);
VectorUshort(const unichar* arg, unichar delim_a = DEF_DELIM);
VectorUshort& operator= (ushort value);
VectorUshort val0(3); val0.assign(L"5, 7, 9"); String tmp_filename(L"foo"); Sof tmp_file; tmp_file.open(tmp_filename, File::WRITE_ONLY, File::TEXT); val0.write(tmp_file, (long)0); tmp_file.close();
VectorUshort val0; VectorUshort val1(4); ushort dotp; ushort norm_val; val0.assign(L"1, 3, 5, 7"); val1.assign(L"2, 4, 6, 3"); dotp = val0.dotProduct(val1); norm_val = val1.norm();