Sponsored Content
Top Forums Shell Programming and Scripting Grouping array elements - possible? Post 302811585 by dnn on Thursday 23rd of May 2013 05:44:23 PM
Old 05-23-2013
bump /tooshort
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Deleting Array Elements

Hi, I am writing a BASH shell script. I have an array that will contain IN ANY ORDER the following elements: DAY 8D MO NS. I would like to erase the element DAY, but since the order of the elements in the array are random, I will not know which element # DAY is (ie it's not as simple as... (3 Replies)
Discussion started by: msb65
3 Replies

2. Shell Programming and Scripting

Accessing array elements

Hi, My doubt is how to access array elements.. Situation is as below: #!/bin/ksh set -x typeset -i x=0 typeset -i y=0 typeset -i BID=0 typeset -i count=0 while ] ; do x=`expr $x + 1`; hwmgr show scsi > scsi.tmp while read line; do set... (1 Reply)
Discussion started by: mansa
1 Replies

3. Shell Programming and Scripting

Array with String Elements

How can I get my array to understand the double-quotes I'm passing into it are to separate text strings and not part of an element? here's what I'm working with... db2 -v connect to foo db2 -x "select '\"' || stats_command || '\",' from db2law1.parallel_runstats where tabname = 'BAZ'" set... (4 Replies)
Discussion started by: djschmitt
4 Replies

4. Shell Programming and Scripting

PERL : SQL array bind issue while grouping

Hi, I have an array of strings. Each string has 4 comma separated values. I am binding this array to a SQL where I am required to do an INSERT after grouping. The binding is done as : $insertADWSth->bind_param_array(1,A_CONSTANT_STRING);... (1 Reply)
Discussion started by: sinpeak
1 Replies

5. UNIX for Dummies Questions & Answers

Help with replacing Array elements

Hi, I have an array containing following sample information @array = qw (chr02 chr02 chr02 chr02 chr02 chr03 chr03 chr04 chr04 chr05 chr05 chr05 chr07 chr07) I need to replace all duplicate entries by an underscore to get the following output@array = qw (chr02 _ _ _ _ chr03 _ chr04 _ chr05 _ _... (4 Replies)
Discussion started by: pawannoel
4 Replies

6. Shell Programming and Scripting

Removing elements from an array

Hi I have two arrays : @arcb= (450,625,720,645); @arca=(625,645); I need to remove the elements of @arca from elements of @arcb so that the content of @arcb will be (450,720). Can anyone sugget me how to perform this operation? The code I have used is this : my @arcb=... (3 Replies)
Discussion started by: rkrish
3 Replies

7. Programming

Array Elements Check

Hi everyone, :) I'm trying to make a simple C program that scans an array of chars to see if its elements are similar. I can't understand what's wrong. Could you help me to fix this? Here is the code. Thanks! #include<stdio.h> int main() { int arr; int i, len; int flag =... (10 Replies)
Discussion started by: IgorGest
10 Replies

8. Shell Programming and Scripting

Random elements from array

Hi I wanted to print random elements from an array at bash shell I use the following code, but I always see first element getting printed #!/bin/bash c=1 expressions=(pink red white yellow purple) while ]; do echo "The value of RANDOM is $RANDOM" selectedexpression=${expressions}]};... (5 Replies)
Discussion started by: Priya Amaresh
5 Replies

9. Shell Programming and Scripting

Help reading the array and sum of the array elements

Hi All, need help with reading the array and sum of the array elements. given an array of integers of size N . You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large. Input Format The first line of the input consists of an... (1 Reply)
Discussion started by: nishantrefound
1 Replies

10. Shell Programming and Scripting

Get unique elements from Array

I have an array code and output is below: echo $1 while read -r fline; do echo "%%%%%%$fline%%%%%" fmy_array+=("$fline") done <<< "$1" Output: CR30903 YU0007 SRIL CR30903 Yogesh SRIL %%%%%%CR30903 YU0007 SRIL%%%%% %%%%%%CR30903 Yogesh SRIL%%%%% ... (8 Replies)
Discussion started by: mohtashims
8 Replies
SoBumpMapMatrixElement(3)					       Coin						 SoBumpMapMatrixElement(3)

NAME
SoBumpMapMatrixElement - The SoBumpMapMatrixElement class is used to manage the bump map matrix stack. The bump map matrix is used to transform bump map coordinates before being used to map bump maps onto polygons. SYNOPSIS
#include <Inventor/elements/SoBumpMapMatrixElement.h> Inherits SoAccumulatedElement. Public Member Functions virtual void init (SoState *state) virtual void push (SoState *state) Static Public Member Functions static SoType getClassTypeId (void) static int getClassStackIndex (void) static void * createInstance (void) static void initClass (void) static void makeIdentity (SoState *const state, SoNode *const node) static void set (SoState *const state, SoNode *const node, const SbMatrix &matrix) static void mult (SoState *const state, SoNode *const node, const SbMatrix &matrix) static void translateBy (SoState *const state, SoNode *const node, const SbVec3f &translation) static void rotateBy (SoState *const state, SoNode *const node, const SbRotation &rotation) static void scaleBy (SoState *const state, SoNode *const node, const SbVec3f &scaleFactor) static const SbMatrix & get (SoState *const state) Protected Member Functions virtual ~SoBumpMapMatrixElement () virtual void makeEltIdentity (void) virtual void setElt (const SbMatrix &matrix) virtual void multElt (const SbMatrix &matrix) virtual void translateEltBy (const SbVec3f &translation) virtual void rotateEltBy (const SbRotation &rotation) virtual void scaleEltBy (const SbVec3f &scaleFactor) virtual const SbMatrix & getElt (void) const Protected Attributes SbMatrix bumpMapMatrix Detailed Description The SoBumpMapMatrixElement class is used to manage the bump map matrix stack. The bump map matrix is used to transform bump map coordinates before being used to map bump maps onto polygons. Constructor &; Destructor Documentation SoBumpMapMatrixElement::~SoBumpMapMatrixElement (void) [protected], [virtual] The destructor. Member Function Documentation SoType SoBumpMapMatrixElement::getClassTypeId (void) [static] This static method returns the class type. Reimplemented from SoAccumulatedElement. int SoBumpMapMatrixElement::getClassStackIndex (void) [static] This static method returns the state stack index for the class. Reimplemented from SoAccumulatedElement. void * SoBumpMapMatrixElement::createInstance (void) [static] This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. void SoBumpMapMatrixElement::initClass (void) [static] Initialize relevant common data for all instances, like the type system. Reimplemented from SoAccumulatedElement. void SoBumpMapMatrixElement::init (SoState *state) [virtual] This function initializes the element type in the given SoState. It is called for the first element of each enabled element type in SoState objects. Reimplemented from SoAccumulatedElement. void SoBumpMapMatrixElement::push (SoState *state) [virtual] This method is called every time a new element is required in one of the stacks. This happens when a writable element is requested, using SoState::getElement() or indirectly SoElement::getElement(), and the depth of the current element is less than the state depth. Override this method if your element needs to copy data from the previous top of stack. The push() method is called on the new element, and the previous element can be found using SoElement::getNextInStack(). Reimplemented from SoAccumulatedElement. void SoBumpMapMatrixElement::makeIdentity (SoState *conststate, SoNode *constnode) [static] Sets current texture matrix to identity. void SoBumpMapMatrixElement::set (SoState *conststate, SoNode *constnode, const SbMatrix &matrix) [static] Sets the current texture matrix to matrix. This method is an extension versus the Open Inventor API. void SoBumpMapMatrixElement::mult (SoState *conststate, SoNode *constnode, const SbMatrix &matrix) [static] Multiplies matrix into the current texture matrix. void SoBumpMapMatrixElement::translateBy (SoState *conststate, SoNode *constnode, const SbVec3f &translation) [static] Appends translation to the current texture matrix. void SoBumpMapMatrixElement::rotateBy (SoState *conststate, SoNode *constnode, const SbRotation &rotation) [static] Appends rotation to the current texture matrix. void SoBumpMapMatrixElement::scaleBy (SoState *conststate, SoNode *constnode, const SbVec3f &scaleFactor) [static] Appends scaleFactor to the current texture matrix. const SbMatrix & SoBumpMapMatrixElement::get (SoState *conststate) [static] Returns current texture matrix. void SoBumpMapMatrixElement::makeEltIdentity (void) [protected], [virtual] virtual method which is called from makeIdentity(). Sets element matrix to identity. void SoBumpMapMatrixElement::setElt (const SbMatrix &matrix) [protected], [virtual] virtual method which is called from set(). Sets the texture matrix to matrix. This method is an extension versus the Open Inventor API. void SoBumpMapMatrixElement::multElt (const SbMatrix &matrix) [protected], [virtual] virtual method which is called from mult(). Multiplies matrix into element matrix. void SoBumpMapMatrixElement::translateEltBy (const SbVec3f &translation) [protected], [virtual] virtual method which is called from translateBy(). Appends translation to the element matrix. void SoBumpMapMatrixElement::rotateEltBy (const SbRotation &rotation) [protected], [virtual] virtual method which is called from rotateBy(). Appends rotation to the element matrix. void SoBumpMapMatrixElement::scaleEltBy (const SbVec3f &scaleFactor) [protected], [virtual] virtual method which is called from scaleBy(). Append scaleFactor to the element matrix. const SbMatrix & SoBumpMapMatrixElement::getElt (void) const [protected], [virtual] Returns element matrix. Called from get(). Member Data Documentation SoBumpMapMatrixElement::bumpMapMatrix [protected] The matrix. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SoBumpMapMatrixElement(3)
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy