Sponsored Content
Top Forums Shell Programming and Scripting Finding indices in an array nearest to a set of values Post 302538391 by kristinu on Tuesday 12th of July 2011 09:48:20 PM
Old 07-12-2011
It works but trying to figure out the calculations. Values in both XOFFS and BINDIST will have both negative and positive values.
The values can be floating point, not just integers.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Max amount of awk array indices

Does anyone know what the max amount of indices you can store in a awk array? (0 Replies)
Discussion started by: timj123
0 Replies

2. Shell Programming and Scripting

Finding Max value from an array

Hi, I need to find max and second max element from an array. array contains 0338,0337,0339,0340,0401,0402,0403 (10 Replies)
Discussion started by: vjasai
10 Replies

3. UNIX for Advanced & Expert Users

Finding register set being used in program

How can i find( or list) contents of all registers being used by my program? Is there any system call or library available for this?:confused: At runtime in my c/c++ program. At runtime using may be some assembly hack!!!!!!!!!!! (2 Replies)
Discussion started by: amit gangarade
2 Replies

4. Shell Programming and Scripting

PHP: Search Multi-Dimensional(nested) array and export values of currenly worked on array.

Hi All, I'm writing a nagios check that will see if our ldap servers are in sync... I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable so...eg...let take the single array... (1 Reply)
Discussion started by: zeekblack
1 Replies

5. Shell Programming and Scripting

Finding the most frequently occurring set of words

Hi guys, I have a file with a list of phoneme for words, it looks like this: AILS EY1 L Z AIMLESSLY EY1 M L AH0 S L IY0 AIMONE EY1 M OW2 N AIMS EY1 M Z AINGE EY1 NG AINGE(2) EY1 N JH AINLEY EY1 N L IY0 AINSLIE EY1 N Z L IY0 AIR EH1 R AIRBAGS EH1 R B AE2 G Z and I need to... (5 Replies)
Discussion started by: Andrew9191
5 Replies

6. SCO

Help finding where certain environment variables are set

i have two machines that should be identical but on one system there are some oracle environment (ORACLE_SID, ORACLE_HOME, etc...) variables that are not being set for the users. I am trying to find where those environment variables are being set on the system which is working properly. All... (5 Replies)
Discussion started by: kuliksco
5 Replies

7. Programming

Finding range of values in an array

I have an array containing distances in ascending order, for example: distances = 100 120 150 170 200 280 300 .... I have a number, let's say v = 170 and a variation value, let's say var = 100 . I want to return the array indexes for which the distances cover the range (v - var) to (v +... (3 Replies)
Discussion started by: kristinu
3 Replies

8. UNIX for Dummies Questions & Answers

finding nearest value in a column

Hi, I have 2 files: file1: 1 ia 2 1 mn 6 1 sd 11 2 ny 3 2 ma 10 3 wa 7 3 ca 8 file2 1 mi 3 1 wi 5 2 pa 4 3 id 6 (2 Replies)
Discussion started by: peanuts48
2 Replies

9. Shell Programming and Scripting

Finding compound words from a set of files from another set of files

Hi All, I am completely stuck here. I have a set of files (with names A.txt, B.txt until L.txt) which contain words like these: computer random access memory computer networking mouse terminal windows All the files from A.txt to L.txt have the same format i.e. complete words in... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

10. Shell Programming and Scripting

How to get value from array and set those values as a variable

I am new to ksh scripting, specially array. How do i get values from an array and set the value as variable and pass those variables to the different functions?? someone taught me how to get input from a file with have columns i need to read, but now i doesnt know how to set those value to be a... (7 Replies)
Discussion started by: gavin_L
7 Replies
GLGETMATERIAL(3G)														 GLGETMATERIAL(3G)

NAME
glGetMaterialfv, glGetMaterialiv - return material parameters C SPECIFICATION
void glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) void glGetMaterialiv( GLenum face, GLenum pname, GLint *params ) PARAMETERS
face Specifies which of the two materials is being queried. GL_FRONT or GL_BACK are accepted, representing the front and back materi- als, respectively. pname Specifies the material parameter to return. GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_EMISSION, GL_SHININESS, and GL_COLOR_INDEXES are accepted. params Returns the requested data. DESCRIPTION
glGetMaterial returns in params the value or values of parameter pname of material face. Six parameters are defined: GL_AMBIENT params returns four integer or floating-point values representing the ambient reflectance of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1], the corresponding integer return value is undefined. The initial value is (0.2, 0.2, 0.2, 1.0) GL_DIFFUSE params returns four integer or floating-point values representing the diffuse reflectance of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1], the corresponding integer return value is undefined. The initial value is (0.8, 0.8, 0.8, 1.0). GL_SPECULAR params returns four integer or floating-point values representing the specular reflectance of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1], the corresponding integer return value is undefined. The initial value is (0, 0, 0, 1). GL_EMISSION params returns four integer or floating-point values representing the emitted light intensity of the material. Inte- ger values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1.0], the corresponding integer return value is undefined. The initial value is (0, 0, 0, 1). GL_SHININESS params returns one integer or floating-point value representing the specular exponent of the material. Integer val- ues, when requested, are computed by rounding the internal floating-point value to the nearest integer value. The initial value is 0. GL_COLOR_INDEXES params returns three integer or floating-point values representing the ambient, diffuse, and specular indices of the material. These indices are used only for color index lighting. (All the other parameters are used only for RGBA lighting.) Integer values, when requested, are computed by rounding the internal floating-point values to the near- est integer values. NOTES
If an error is generated, no change is made to the contents of params. ERRORS
GL_INVALID_ENUM is generated if face or pname is not an accepted value. GL_INVALID_OPERATION is generated if glGetMaterial is executed between the execution of glBegin and the corresponding execution of glEnd. SEE ALSO
glMaterial(3G) GLGETMATERIAL(3G)
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy