Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

161
Visualizações
Append Multiple Arrays Together using VB.Net

I have a jagged array that contains 40 different arrays. Each one of them has dimensions (250, 250, 2).

I'd like to combine them all into a new array with dimensions (250 * 40, 250 * 40, 2 * 40).

Starting with the first array lbound(jagged) to the last ubound(jagged).

What is a good approach to doing this? I was thinking of simply using loop:

Dim DWG(250 * 40, 250 * 40, 2 * 40) as Double
Dim jagged(40)() as Double = GetArrays(jagged) ' get 40 arrays    
Dim arr(250, 250, 2) as Double

for i = 0 to ubound(jagged)        
    arr = jagged(i)
    for channel = 0 to ubound(arr, 3) 
        for row = 0 to ubound(arr, 1) 
            for column = 0 to ubound(arr, 2) 
                DWG(row + (250 * i), column + ( 250 * i), channel + (2 * i)) = arr(row, column, channel)
            next
        next
    next
next        

I can confirm the above code works. Still seems like there could be a better approach. Just for a little context I'm editing pixel data.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda