Questions tagged [heterogeneous]

This tag is ambiguous. Please use other, more specific tags to narrow down the scope of your question.

This tag is ambiguous. Please use other, more specific tags to narrow down the scope of your question.

116 questions
2
votes
1 answer

Compilation issue with existential types in Haskell

I've written a simple typeclass Shape: class Shape a where draw :: a -> IO () move :: (Double,Double) -> a -> a area :: a -> Double circum :: a -> Double I also have concrete types Circle, Rect and Triangle that instantiate this…
2
votes
1 answer

Decode heterogeneous array JSON using Swift decodable

This is the JSON I am trying to decode. The value of objectType decides what object to create. { "options": [ { "objectType": "OptionTypeA", "label": "optionALabel1", "value": "optionAValue1" }, { "objectType":…
iOSer
  • 235
  • 2
  • 14
2
votes
2 answers

Show instance for Heterogeneous List

I am having trouble defining a Show instances for the heterogeneous list defined below: {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE FlexibleInstances #-} import Data.Kind data HList xs where …
mna
  • 263
  • 2
  • 8
2
votes
1 answer

Oracle 11gr2 connection to Sql Server using dg4msql problem

To whom it may respond to, We have installed Oracle 11g r2 on a Redhat Enterprise Linux 5.4 . We are trying to connect to a Sql Server 2005, after applying some notes the error below is the result we got : "ORA-28513 internal error in heterogenous…
kayhan yüksel
  • 378
  • 2
  • 9
  • 24
2
votes
1 answer

map or set with transparent comparator and non-unique elements in heterogeneous sense

Given std::set< T, less > or std::map< T, less > container of unique elements. less is heterogeneous comparator. I.e. it can compare value of some another type U against a value of type T. Whereas all the values of type T are unique, there are…
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169
2
votes
1 answer

use METIS to partition heterogeneous architectures

Based on METIS official manual, it can partition graphs into k unequal parts with different capacities for vertices: METIS’ graph and mesh partitioning programs and API routines are designed to partition a graph into k parts such that each part…
Firouziam
  • 777
  • 1
  • 9
  • 31
2
votes
1 answer

Haskell heterogeneous list of Storable objects

I want to write function that can poke heterogeneous list of Storable objects (different types) {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes, ExistentialQuantification, ImpredicativeTypes #-} pokeMany :: Ptr b -> Int -> [forall a.…
Bet
  • 389
  • 4
  • 13
2
votes
4 answers

Managing different objects in an heterogeneous Java array

I have to solve this "container problem" in Java. I have an array made up with different figures and I'd like the following code to work: package container; class Figure{ public void draw() {} public String getColor() { return…
user1868607
  • 2,558
  • 1
  • 17
  • 38
2
votes
1 answer

Haskell: Type (without boilerplate) for a heterogeneous list of String and/or [String]?

I would like to have a heterogeneous list of String and [String], as such: strs = ["h", ["x", "y"], "i", ["m", "n", "p"]] I know I can do this with a custom data type: data EitherOr t = StringS t | StringL [t] eitherOrstrs :: [EitherOr…
spacingissue
  • 497
  • 2
  • 12
2
votes
4 answers

How to implement an heterogeneous container in Scala

I need an heterogeneous, typesafe container to store unrelated type A, B, C. Here is a kind of type-level specification : trait Container { putA(a: A) putB(b: B) putC(c: C) put(o: Any) = { o match { case a: A => putA(a) case b: B =>…
Yann Moisan
  • 8,161
  • 8
  • 47
  • 91
2
votes
1 answer

Statically-typed heterogeneous list builder

What I am trying to achieve is a way to: Define the list of types for a heterogeneous list From the definition above, build a statically typed list of values Ideally I would like to type the following expression in the IDE: val record =…
2
votes
0 answers

How to model multiplicative effect of parameters/fit data at individual predictor level

I am having difficulty in fitting a model on data. Basically, I have data about the evaluation of phenotypic property (i.e. hard) of 65 palm trees by 5 judges. As an evaluation scheme, each judge provides score to each sample. For 3 judges sample…
maddy
  • 21
  • 1
2
votes
4 answers

Taking values out of a heterogenous list

I'm trying to create a heterogenous list of values that all belong to a certain typeclass. In my case, the typeclass is a multi-parameter typeclass with functional dependencies, but for simplicity's sake, I'll use the Show typeclass here as an…
stonegrizzly
  • 229
  • 1
  • 9
2
votes
1 answer

How is the RDF based Heterogeneous Relational Database Integration work?

My Question is how I can integrate two Heterogeneous Relational Databases based on RDF? Is that done just by transferring the two relational databases, one by one separately into RDF statements, and then save them into one RDF table? Or I have to do…
Saad
  • 374
  • 5
  • 19
2
votes
2 answers

How to call virtual function of an object in C++

Possible Duplicate: Overriding parent class’s function I'm struggling with calling a virtual function in C++. I'm not experienced in C++, I mainly use C# and Java so I might have some delusions, but bear with me. I have to write a program where I…
vinczemarton
  • 7,756
  • 6
  • 54
  • 86