example2.q File Reference

Go to the source code of this file.

Namespaces

namespace  _u
 

class embedded


namespace  v
 

Sometimes you see this.


namespace  _t
 

A class.


namespace  _t::i
 

a nested class with a function


Functions

 f ()
 Identity function.
 _u::f (x)
 v::g (x)
 _t::f (x)
 classed function
 _t::i::h (x)
 g ()
 i (x)
 dotproduct (x, y)
 dotproductloop (x, y)

Variables

 x = 42
 Comments starting with a double slash are processed.
 y = "\"}" "\\"
 _u::g = 42
 _t::g = 42
 classed static
 trade

Function Documentation

dotproduct ( x  ,
y   
)

Compute the dot product of 2 arrays

Parameters:
x an array
y another array
Returns:
x.y

Definition at line 59 of file example2.q.

References x, and y.

dotproductloop ( x  ,
y   
)

Compute the dot product of 2 arrays

Parameters:
x an array
y another array
Returns:
x.y

Remarks:
Very un-q like!
Note:
Example only.

Definition at line 67 of file example2.q.

References i(), x, and y.

f (  ) 

Identity function.

Definition at line 20 of file example2.q.

References x.

g (  ) 

Simple function. Doesn't do much!

Returns:
the value 42

Definition at line 48 of file example2.q.

i ( x   ) 

Identity function.

Parameters:
x a value
Returns:
the same value

Definition at line 53 of file example2.q.

References x.


Variable Documentation

Initial value:
([]
   time :   `time$();
   sym :    `symbol$();
   price :  `float$();
   size :   `int$()
)

A table of trades

  • time: the time the trade was made
  • sym: the the stock symbol
  • price: the traded price
  • size: the number of units traded

Definition at line 85 of file example2.q.

x = 42

Comments starting with a double slash are processed.

a global variable

Definition at line 14 of file example2.q.

y = "\"}" "\\"

Definition at line 16 of file example2.q.

 All Namespaces Files Functions Variables
Generated on Sun May 16 04:20:00 2010 for q/kdb+ by  doxygen 1.6.3