Example FltVector map 005

 

 

Description

This example defines a FltVector and applies the add1 function to each element of the Vector using the map function.

 

Details

A Float Vector is defined.

(define Scores #(float| 5.456699848175 3.141592025757 ) ) Returns: #<FltVector 123456>

Increments the values by one.

(setq NewScores (map add1 Scores)) Returns: #<FltVector 123456>

Displays the resulting Vector.

NewScores[0] Returns: 6.456699848175
NewScores[1] Returns: 4.140999794006

 

Related Examples

Here are examples of the map function at work.

Dictionary map 002 Directory map 003 FltVector map 005 IntVector map 006
Matrix map 006 Matrix map 007 NumMatrix map 010 NumVector map 007
Pair map 008 ShortVector map 007 Structure map 001 Vector map 004

 

Function Links

Here is the link to the current function used in this example.

map

Here are a number of links to other related functions.

mapc(#void) new(#void)

 

Argument Types

Here are the links to the data types of the arguments used in this example.

FltVector

Here are a number of links to examples having similar argument types.

Dictionary isDictionary 001 FltVector addMethod 019 FltVector append 007 FltVector apply 005
FltVector binarySearch 005 FltVector cdr 006 FltVector compare 014 FltVector compareEQ 014
FltVector compareGE 014 FltVector compareGT 014 FltVector compareNE 014 FltVector comparison functions 014
FltVector copy 006 FltVector defmethod 017 FltVector delete 009 FltVector insert 005
FltVector isAtom 005 FltVector isEqual 013 FltVector isFloatVector 001 FltVector isIdentical 012
FltVector isObject 007 FltVector isType 016 FltVector length 008 FltVector map 005
FltVector mapc 005 FltVector methodsOf 017 FltVector new 009 FltVector ref 022
FltVector resize 006 FltVector reverse 003 FltVector send 015 FltVector setCdr 006
FltVector setLastCdr 006 FltVector setq 019 FltVector sizeof 014 FltVector sort 013
FltVector type 016 FltVector uniqueInsert 004 FltVector vectorFill 003 String isChar 001
String isCharAlphabetic 001 String isCharAlphanumeric 001 String isCharLowercase 001 String isCharName 001
String isCharNumeric 001 String isCharUppercase 001 String isCharWhitespace 001 String isEqual 001
String isEqual 002 String isObject 001 String isString 001 String isText 001
String isType 001 String isType 002 String isType 003 String sizeof 001
String string 001 String string 002 String string 003 String type 001
Symbol isCharName 002 Symbol isCharNumeric 002 Symbol isObject 002 Symbol isSymbol 001
Symbol isType 004 Symbol sizeof 002 Symbol type 002

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE