Questions tagged [lookup-tables]

A look-up table is an array or matrix of data that contains items that can be searched. Lookup tables may be arranged as key-value pairs, where the keys are the data items being searched (looked up) and the values are either the actual data or pointers to where the data are located.

A look - up table is an array or matrix of data that contains items that are searched. Lookup tables may be arranged as key-value pairs, where the keys are the data items being searched (looked up) and the values are either the actual data or pointers to where the data are located.

798 questions
6
votes
1 answer

How to make a 1D lut in C++ for GLSL

I'm beginning to understand how to implement a fragment shader to do a 1D LUT but I am struggling to find any good resources that tell you how to make the 1D LUT in C++ and then texture it. So for a simple example given the following 1D lut…
Maggick
  • 763
  • 2
  • 10
  • 26
6
votes
1 answer

Type casting error with numpy.take

I have a look-up table (LUT) that stores 65536 uint8 values: lut = np.random.randint(256, size=(65536,)).astype('uint8') I want to use this LUT to convert the values in an array of uint16s: arr = np.random.randint(65536, size=(1000,…
Jaime
  • 65,696
  • 17
  • 124
  • 159
6
votes
1 answer

Does HBase uses a primary index?

How does HBase performs a lookup and retrieves a record ? e.g., what is the equivalent in HBase for the RDBMS's B-Trees? [EDIT] I understand how HBase resolves the -ROOT-, and .META. tables to find out which region holds the data. But how is the…
David
  • 1,842
  • 2
  • 21
  • 31
6
votes
2 answers

3 integer key lookup in CUDA

I'd like to look up 3 integers (i.e. [1 2 3]) in a large data set of around a million points. I'm currently using MATLAB's Map (hashmap), and for each point I'm doing the following: key = sprintf('%d ', [1 2 3]); % 23 us % key = '1 2 3…
Alex L
  • 8,748
  • 5
  • 49
  • 75
6
votes
1 answer

LUT for different channels in C++, opencv2

I've been playing around with opencv2 implemented in C++ for a couple of days and noticed that the lookup tables are the fastest way to apply changes to an image. However, I've been having some troubles with using them for my purposes. The code…
Michal B
  • 280
  • 5
  • 10
6
votes
3 answers

Circuit that counts the number of set bits in 15-bit input

How to build an area-efficient circuit that counts the number of set bits in 15-bit input using 4-input LUTs (look-up tables). The output is obviously 4-bit (counts 0-15). Some claim that it's possible to do using 9 LUTs.
OutputLogic
  • 756
  • 4
  • 12
5
votes
5 answers

Database: Currencies By CountryCode?

Where do I get a list of currencies along with country code? Example Code, Currency Name, Country, Format, Decimal Points, Currency Regime, Major Unit, Minor Unit, Equivalence, USD, US Dollar, United States, $#,###.##,…
001
  • 62,807
  • 94
  • 230
  • 350
5
votes
1 answer

Avoiding Joins to Reference/Lookup Tables in Doctrine 2

In my application, I have a a number of simple reference/lookup database tables used for supplying a list of permitted values in a related table. (You know, a 'Countries' table has a list of countries that are permitted in the 'country' field of the…
cantera
  • 24,479
  • 25
  • 95
  • 138
5
votes
2 answers

Writing a HLSL4 pixel shader to perform a lookup from a 2Dtexture

I'm a beginner pixel shader writer and I'm running into some trouble. I want to take a 256x256, 16-bit input (DXGI_FORMAT_R16_UINT) image, and pass it through a 256x256 look-up texture (DXGI_FORMAT_R8_UNORM) to convert it to a 256x256 8-bit…
SJoshi
  • 1,866
  • 24
  • 47
5
votes
1 answer

Lookup table based on multiple conditions in R

Thank you for taking a look at my question! I have the following (dummy) data for patient performance on 3 tasks: patient_df = data.frame(id = seq(1:5), age = c(30,72,46,63,58), education = c(11, 22,…
zoey107
  • 53
  • 3
5
votes
2 answers

How to use LookUp tables in oracle?

In my database, many tables have the 'State' field, representing the state that, that particular entity falls in. I have been told that we should use Lookup tables for this kind of thing, but I am unsure of the exact mechanism. Can someone clarify…
Devdatta Tengshe
  • 4,015
  • 10
  • 46
  • 59
5
votes
1 answer

dplyr lookup table / pattern matching

I was looking for a smart, or "tidier" way, to make use of a lookup table in the tidyverse, but could not find a satisfying solution. I have a dataset and lookup table: # Sample data data <- data.frame(patients = 1:5, treatment =…
Marco
  • 71
  • 1
  • 1
  • 6
5
votes
2 answers

Using a lookup table for regex patterns

I recently encountered a suggestion for the regex patterns utilised across our application code base to be pooled together into a lookup table, and retrieved from there rather than explicitly hard-coded within the program logic. Can anyone share any…
James Wiseman
  • 29,946
  • 17
  • 95
  • 158
5
votes
1 answer

Should I consider that declaring all C static functions is a good practice?

I recently wrote a piece of C code like that: static void func1() { } static void func2() { } typedef void (*func_t)(void); const func_t lookUpTable[FUNC_COUNT] = { [FUNC1] = &func1, [FUNC2] = &func2 } An other programmer worked on…
Plouff
  • 3,290
  • 2
  • 27
  • 45
5
votes
3 answers

How to Apply Color LUT to bitmap images for filter effects in android?

here i have a question on LUTs in android. my question is, i have 4X4 LUTs, Using these LUTs apply filter effect for bitmap image in android. Below is my sample LUT file link. Lut link sample Is it Possible in android? if possible please help me how…
user512
  • 403
  • 4
  • 21