juan_gandhi: (Default)
[personal profile] juan_gandhi
  /**
   * Injection (?) function (if you are a c+ programmer, you'd call it "downcast").
   */
  public static class WHATSMYNAME???<T, T1 extends T> extends Monomorphism<T1, T> {
    public T apply(T1 t) {
      return t;
    }
  }



I just could not figure out what name to give to this simple function. It is almost an identity function, but it is not.

Date: 2008-11-21 10:22 pm (UTC)
From: [identity profile] bishop3000.livejournal.com
Converter
Downcaster :)

Date: 2008-11-21 10:38 pm (UTC)
From: [identity profile] http://users.livejournal.com/_navi_/
Математическое название в голову не приходит, инъекция вроде похоже, но не уверен, что правильно. Из общих: generalizer какой-нибудь.

Date: 2008-11-21 10:47 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
Subobject? Embed? None of them is good... the name should not be a verb and should not mention anything language-specific. Injection, yes... probably is the best so far.

Date: 2008-11-22 10:52 am (UTC)
From: [identity profile] alexey-rom.livejournal.com
По-моему, всё-таки Embedding. Injection не годится, слишком общее.

Date: 2008-11-22 03:43 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
Да, я переименовал Monomorphism в Injection, согласно определениям. Embedding близко к теме, конечно... может быть, Inclusion?

Date: 2008-11-22 03:54 pm (UTC)
From: [identity profile] alexey-rom.livejournal.com
Да, это, похоже (http://en.wikipedia.org/wiki/Inclusion_map) на правду.

Date: 2008-11-22 04:02 am (UTC)
nine_k: A stream of colors expanding from brain (Default)
From: [personal profile] nine_k
narrowDown() ?

Date: 2008-11-22 07:23 am (UTC)
From: [identity profile] anonymous8216.livejournal.com
isn't it an UPcast?

Date: 2008-11-22 08:55 am (UTC)
(deleted comment)

Date: 2008-11-23 04:15 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
Да; моя ошибка - в нескольких местах просочились unchecked assignments.

Два смешных эпизода: а) кастить Set<Iterable<T>> to Iterable<Set<T>>, и интересный переход:
декартово произведение множеств {Pair(x0,y) | y in Y}, {Pair(x1,y) | y in Y}, ... представляется как Set<Iterable<Pair<X,Y>>>>; т.к. этот внутренний Iterable на самом деле Set, то нужно декартово произведение "представить" (отмапить) в виде Set<Iterable<Pair<X,Y>>>, после чего уже отмапить его в форму Set<Map<X,Y>>, чтобы достойно изображать YX.

Hi

Date: 2008-11-26 06:26 pm (UTC)
From: [identity profile] ottilia-22.livejournal.com
Согласен, что пост получился удачным. Хорошая работа!

Re: Hi

Date: 2008-11-26 07:09 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
Я правильно понимаю что автор поста пытается проскочить на халяву тест Тьюринга? Ну попробуем копнуть глубже... вот у меня встречный вопрос насчёт диктофона: отец приводил конкретные примеры удачных его применений? ;)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

July 2025

S M T W T F S
  12345
6789 1011 12
131415 16171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 18th, 2025 06:28 am
Powered by Dreamwidth Studios